Repository navigation
Requirements
- WordPress: 6.6+ (tested up to 7.2)
- PHP: 8.2+ (tested on 8.2, 8.3, 8.4)
Added
- Comment Spam module: honeypot field, client-side time trap, additive content scoring, optional per-IP rate limits, and pingback/trackback backlink verification
- Blocked attempts log with IP, reason, score, user agent, and author details; admin statistics with a reason breakdown, top IPs, and the last attempts
- Monthly
wp_addon_antispam_rotatecron event that prunes the log, plus opportunistic pruning every 50 writes - New
Comment Spamsettings section and assets - Unit tests for scoring, backlink verification, rate limits, the log store, and the gate itself
tests/wp-cli/comment-antispam-smoke.php, a 79-check script for a real WordPress
Changed
- Spam is now rejected with a
WP_Errorand HTTP 403 instead of being stored asspam, so no moderation queue entries, emails, or cache purges are produced - REST comment creation is filtered through
rest_pre_insert_comment, which the comments controller uses instead ofpre_comment_approved - Corrected the WordPress support metadata: 1.4.0 listed
Tested up to: 6.8, but the site runs WordPress 7.2
Fixed
- Rotation schedule now registers the custom
wp_addon_monthlyinterval before scheduling, so the cron event is actually created - REST rejections carry a
['status' => 403]error payload, matching whatrest_convert_error_to_response()expects - The backlink pattern no longer contains a stray
\sin its lookahead, which made a host that merely starts with the site host (rwsite.rusforrwsite.ru) count as a valid backlink - The honeypot is hidden with inline styles as well as CSS, so it stays invisible even if the stylesheet fails to load
- Comments whose type is neither
comment,pingbacknortrackbackare left alone, and a comment already markedspamortrashkeeps its original status CommentAntispambuilds its backlink and rate limit services on first use instead of ininit(), so the gate no longer depends on the initialisation order
Removed
- Kama SpamBlock (
wpackagist-plugin/kama-spamblock) — its checks are now part of the Comment Spam module
Full changelog: CHANGELOG.md