Antispam

For developersVersion 1.0.0Last updated:

SettingDefault
Turn on antispam (master switch)On
Protect commentsOn
Minimum time3 s. It also applies to registration and password recovery.
Allowed links2. With more, the comment goes to moderation.
Comments per IP5 every 10 minutes (0 = no limit)
Blocked wordsEmpty (optional, one per line)
Protect account forms (registration, login and recovery)On
Minimum time on login0 s. Leaving it that way is recommended because password managers fill in and submit instantly.
Turnstile on comments / on accountsOff. It can only be turned on if Turnstile is configured in Forms.
Turn off comments across the whole siteOff

Comments

  • Honeypot field: invisible, outside the tab order and marked so password managers ignore it. If it arrives filled in, the comment goes to Spam.
  • Minimum time: the same signed time token as BuilderOS forms is used. It goes in the HTML, with no cookies or JavaScript. If the comment arrives too fast or without a token (a bot posting directly to wp-comments-post.php), it goes to Spam. With JavaScript a fallback token is also added, which works when the page comes from an old cache.
  • Links: with more than 2 distinct links (including bare addresses), the comment goes to moderation.
  • Blocked words: if they appear in the name, email, website, IP, browser or text, the comment goes to Spam. It is case-insensitive.
  • Limit per IP: when exceeded, the submission is rejected with a visible error (HTTP 429) and logged.
  • Turnstile (optional): the widget appears next to the submit button. If verification fails, the submission is rejected with a visible error.
  • Administrators and editors (moderate_comments) skip the filter.
  • Nothing is lost silently. A suspicious comment is saved to Spam or moderation with its reason, which shows in the “Antispam” column of Comments. Rejected submissions see an error and are left in the log. WordPress empties spam only after EMPTY_TRASH_DAYS (30 days).

Registration, login and “Forgot your password?”

  • The honeypot field, the form token and the minimum time are applied, plus Turnstile if you turn it on. If a submission fails, an error is shown on the login card with the same design as the other errors.
  • It works on the custom-design login, on WordPress’s login, on the embedded one (interim-login, when the session expires), with a custom login URL (for example, if a security module moves wp-login.php to /login, because the check depends on login_init and not on the URL) and in wp_login_form().
  • Only submissions of the wp-login.php form are checked. WooCommerce login, XML-RPC, the REST API and application passwords don’t change.
  • It coexists with an attempt limit. Antispam hooks into authenticate at priority 30 and never replaces an earlier error, for example another module’s block. When it blocks, it returns a WP_Error, so WordPress fires wp_login_failed and the attempt counts toward that limit.

Turn off comments across the whole site

When you turn it on:

  • comments and pings are closed on all content;
  • existing comments are hidden on the site, including comment blocks and the theme’s comments.php template;
  • comment and trackback support is removed from all content types;
  • Comments and Settings → Comments are removed from the menu, along with the bubble in the top bar;
  • edit-comments.php redirects to Security (Antispam section);
  • wp-comments-post.php responds 403, the REST API doesn’t create comments, XML-RPC loses pingbacks and the X-Pingback header disappears.

Saved comments are not deleted: they show again when you turn the option off.

Statistics

The section shows blocked comments (and those held for moderation), blocked registrations (with logins and password recoveries) and blocks from the last week, with a chart per day. “Latest blocked submissions” shows the last 20, with the channel, the reason, the result and the anonymized IP. The statistics can be reset to zero.