Skip to content

disable-pb-tb.ag#806

Open
alexandergull wants to merge 18 commits into
devfrom
disable-pb-tb.ag
Open

disable-pb-tb.ag#806
alexandergull wants to merge 18 commits into
devfrom
disable-pb-tb.ag

Conversation

@alexandergull
Copy link
Copy Markdown
Member

@alexandergull alexandergull commented Jun 4, 2026

Copilot AI review requested due to automatic review settings June 4, 2026 08:49
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

❌ Patch coverage is 75.55556% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.14%. Comparing base (af56aac) to head (b04c864).

Files with missing lines Patch % Lines
...alk/ApbctWP/PingbackTrackback/TrackBackHandler.php 50.00% 6 Missing ⚠️
cleantalk.php 33.33% 2 Missing ⚠️
inc/cleantalk-settings.php 60.00% 2 Missing ⚠️
...talk/ApbctWP/PingbackTrackback/PingbackHandler.php 92.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #806      +/-   ##
============================================
+ Coverage     26.05%   26.14%   +0.09%     
- Complexity     5621     5633      +12     
============================================
  Files           264      267       +3     
  Lines         24126    24171      +45     
============================================
+ Hits           6285     6319      +34     
- Misses        17841    17852      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an optional setting to disable incoming Pingback and Trackback requests (commonly abused for spam) while keeping XML-RPC available for other integrations.

Changes:

  • Added a new plugin setting (wp__disable_pingback_and_trackback) and exposed it in the admin settings UI with a long description view.
  • Implemented PingbackHandler (XML-RPC pingback method interception) and TrackbackHandler (blocks trackback endpoint processing).
  • Added PHPUnit coverage for PingbackHandler.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/ApbctWP/PingbackTrackback/TestPingbackHandler.php Adds unit tests validating pingback method replacement and error response.
lib/Cleantalk/ApbctWP/State.php Introduces default setting flag for disabling pingbacks/trackbacks.
lib/Cleantalk/ApbctWP/PingbackTrackback/TrackbackHandler.php Adds hook-based trackback blocking handler (currently has PHP compatibility/callback signature issues).
lib/Cleantalk/ApbctWP/PingbackTrackback/SettingsView.php Provides title/description/long description text for the new setting.
lib/Cleantalk/ApbctWP/PingbackTrackback/PingbackHandler.php Adds XML-RPC pingback blocking handler returning IXR_Error.
inc/cleantalk-settings.php Registers the new setting field and its long-description payload.
cleantalk.php Instantiates pingback/trackback handlers on init when the new setting is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/TrackbackHandler.php Outdated
Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/TrackbackHandler.php Outdated
Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/TrackBackHandler.php
Comment thread inc/cleantalk-settings.php Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 08:55
alexandergull and others added 2 commits June 4, 2026 13:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Comment thread tests/ApbctWP/PingbackTrackback/TestPingbackHandler.php
Comment thread inc/cleantalk-settings.php Outdated
Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/TrackBackHandler.php
Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/TrackBackHandler.php
Copilot AI review requested due to automatic review settings June 4, 2026 09:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/PingbackHandler.php
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 09:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread inc/cleantalk-settings.php
Comment thread inc/cleantalk-settings.php
Comment thread tests/ApbctWP/PingbackTrackback/TestTrackBackHandler.php
Copilot AI review requested due to automatic review settings June 4, 2026 09:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread lib/Cleantalk/ApbctWP/PingbackTrackback/PingbackHandler.php Outdated
Comment thread tests/ApbctWP/PingbackTrackback/TestSettingsView.php Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 09:29
alexandergull and others added 4 commits June 4, 2026 14:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread tests/ApbctWP/PingbackTrackback/TestSettingsView.php
Copy link
Copy Markdown
Contributor

@AntonV1211 AntonV1211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants