Linux 软件免费装
Banner图

Onsite Spam Guard

开发者 jeromewincek
更新时间 2026年11月4日 11:29
PHP版本: 8.2 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

comments honeypot spam woocommerce antispam

下载

1.7.2 1.5.0 1.1.2 1.1.3 1.2.0 1.4.0 1.5.1 1.3.0 1.2.1 1.6.0 1.7.0 1.7.1

详情介绍:

Onsite Spam Guard blocks spam on the forms your visitors actually use — WordPress comments, Contact Form 7, WooCommerce product reviews, Jetpack contact forms and WP Job Manager job submissions, plus account registration and BuddyPress private messages if you want them — without sending anything to a third-party service, requiring an API key, or putting a CAPTCHA in front of your users. Protection is built from a pipeline of independent guards. Each guard is a small, focused check (a hidden honeypot field, a submit-speed gate, a keyword filter, and so on). Every enabled guard looks at every submission, and one objection is enough to block it; the log records every guard that objected, so you can see exactly why. Every guard can be toggled and tuned from a single settings page — for the whole site, or form by form — and every block can be logged for review. Spam guards Why you might choose it Works with

安装:

  1. Upload the onsite-spam-guard folder to /wp-content/plugins/, or install it through Plugins → Add New.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to Spam Guard → Settings to choose which form types to protect and to enable or tune individual guards.
  4. Review anything that gets blocked under Spam Guard → Spam Logs.
No further configuration is required — sensible defaults are applied on activation.

屏幕截图:

  • The Guards tab — individual guard toggles and the thresholds that apply to every form.
  • The Per-form tab — override any threshold for one form, see the starting values a form brings with it, or run a single form in monitor mode and see what enforcing it would catch.
  • The Allowlist tab — allowed IPs, CIDR ranges and emails, the trusted-proxy option, and a check that it matches how your server is reached.
  • The Logging tab — log retention and the option to keep or delete data when the plugin is removed.
  • The Spam Logs viewer — every guard that matched, what monitor mode would have blocked, filters by guard, form and outcome, and per-row and bulk delete.

升级注意事项:

1.7.2 Recommended for every site using Jetpack contact forms: the hidden honeypot and timing checks were not reaching current Jetpack forms, so a bot's first submission could get through. Clear any page cache after updating. 1.7.1 Recommended if you use the optional rate limit: it now counts each IPv6 network as one sender. Also makes allowlisted IP addresses match however they are written. 1.7.0 Adds a review of monitored forms with a one-click Enforce, and read-only access to spam stats for WordPress 6.9+ tools, with no personal data. WP Job Manager listings now allow 10 links instead of 3. Nothing needs reconfiguring. 1.6.0 Adds monitor mode, for trying changes without blocking anyone, and optional protection for account registration forms. Upgrades the log table; existing entries are kept and nothing needs reconfiguring. 1.5.1 Recommended for every site that has "Trust proxy headers" turned on. Also makes blocked keywords work in non-Latin scripts, and fixes "Clear all logs" on some servers. 1.5.0 Adds protection for Contact Form 7, WP Job Manager and BuddyPress private messages. Also fixes link counting: a linked web address whose text is the address itself was counted twice, which could reject ordinary submissions containing four links. Nothing needs reconfiguring. 1.3.0 Recommended if you use the duplicate or rate-limit guard: both were recording the wrong submissions, which let a bot bypass the rate limit and could refuse a genuine visitor as a duplicate. Upgrades the log table; existing entries are kept and nothing needs reconfiguring. 1.2.1 Fixes IPv6 allowlist entries being ignored, plus two smaller issues. Recommended if you allowlist by IP range. 1.2.0 Adds an optional rate-limit guard and an option to reuse WordPress's own Disallowed Comment Keys on every protected form. Both are off by default; nothing changes unless you enable them. 1.1.3 Compatibility bump for WordPress 7.1. No functional changes. 1.1.2 Renamed to Onsite Spam Guard, plus a capability check on the spam-log bulk delete. Settings and logs carry over unchanged. 1.1.1 Fixes legitimate Jetpack contact form submissions being wrongly flagged as spam. Recommended for anyone protecting Jetpack forms. 1.1.0 Tabbed settings, an option to keep your data on uninstall, and multisite-wide cleanup. 1.0.1 Adds explicit-field support to the integration API for REST/JSON forms and prevents false rejections for content-only integrations. 1.0.0 Initial release.

常见问题:

Does this send my data to any external service?

No. Every check runs on your own server. Nothing about a submission is sent anywhere outside your site.

Will legitimate visitors see a CAPTCHA or extra step?

No. All protection is invisible. The honeypot field is hidden, and the timing and behavioral checks happen in the background.

What does it store, and for how long?

When a submission is blocked, or would have been under monitor mode (and logging is enabled), the plugin records when it happened, every guard that objected, the form, the reason, whether it was blocked or let through, a short excerpt of the content, the visitor IP address, and the browser user-agent. Entries older than the retention window (default 30 days, configurable; set to 0 to keep them indefinitely) are pruned automatically. The plugin also registers suggested privacy-policy text you can add to your site's policy.

Can AI assistants and other tools read the spam log?

On WordPress 6.9 and later, the plugin offers two read-only "abilities" through WordPress's Abilities API: a summary of the last 7 days, and a list of recent blocks. Tools that use the API — REST clients, MCP connectors, and AI features built on WordPress's AI Client — can read them, but only when acting for someone who can manage the site's settings: the same people who can open the Spam Logs screen. They leave out personal data. There are no IP addresses, no browser user-agents and none of the submitted text: only when a submission was blocked, on which form, which checks objected, and why. The plugin sends nothing anywhere itself; the abilities answer only when something on your site asks. On earlier versions of WordPress they are not registered and nothing changes.

I'm behind Cloudflare or a load balancer and the wrong IP is logged.

By default the plugin uses the direct connection IP, because forwarded headers can be forged. If your site sits behind a reverse proxy, enable Trust proxy headers for IP detection under Spam Guard → Settings → Allowlist. The visitor's address is then read from the entry your proxy added to the X-Forwarded-For header, which a visitor cannot forge. That relies on your server accepting traffic only from the proxy: if it can also be reached directly, a visitor who goes around the proxy can still supply an address of their choosing. With Cloudflare, that means restricting your server to Cloudflare's published address ranges. To check your setup, look at What this server sees beneath the setting. It shows the address your request arrived from, whether a forwarded header was present, and the address the plugin is using, with a plain verdict on whether the setting matches. The same check runs under Tools → Site Health, and is marked critical when the setting is on, an allowlist is in use, and a request reached the server without passing through a proxy. If your site sits behind two proxies — Cloudflare in front of a load balancer, for example — every visitor will appear to come from a Cloudflare address. A developer can correct that with the simple_spam_shield_trusted_proxy_hops filter, returning the number of proxies in front of the site.

A legitimate submission was blocked. What do I do?

By default a blocked comment or review is placed in the spam queue (Comments → Spam) rather than being rejected outright, so you can restore a false positive with one click — nothing is lost. Open Spam Guard → Spam Logs to see which guard blocked it and why, then loosen that guard on the settings page — for example, raise the link limit, lower the behavioral threshold, or add the sender to the allowlist. If you would rather reject blocked comments with an error message, enable that option under Spam Guard → Settings → General.

Can I limit how often one person can submit?

Yes. Enable Rate limit on the Guards tab, then set the maximum number of submissions and the window they are counted over — 20 per hour and 5 per minute are both expressible. It counts per sender — the logged-in user where there is one, otherwise the connection IP — and each form type is counted separately. It is off by default, because on sites where many visitors share an address (an office, a school, or mobile carrier NAT) an IP-based limit can catch people who are not doing anything wrong. Set the maximum to 0 to disable it without turning the guard off.

Does this work with Contact Form 7?

Yes. Every Contact Form 7 form on the site is protected the moment the plugin is active, and a Contact Form 7 forms switch appears under Protection targets on the General tab. There is nothing to add to your forms. You do not place a tag in each form, and there is no per-form setup — forms you build later are covered the same way, with no step to forget. What runs is the full set of guards rather than a single trick: a hidden field bots fill in, a check that the form was not submitted faster than a person could type, a signature proving the submission came from your site, duplicate detection, an optional rate limit, and your own keyword and link rules. A bot written to step around any one of those still has to get past the rest. A blocked submission is marked as spam, so the visitor sees the message you configured for spam on that form, and the reason is recorded in Contact Form 7's own spam log next to the plugin name. Because Contact Form 7 lets you name fields whatever you like, nothing here matches on field names. It reads the types you built the form from: the message and text fields are screened for content — including the subject line, which spam often targets — and the email field is used as the sender's address. A field holding nothing but a web address is not counted as a link, whether you built it with a URL field or a plain text one, so asking visitors for their website cannot trip the link limit just by being filled in correctly. Links written among your visitor's words still count, which is what spam actually looks like.

Does this work with WP Job Manager?

Yes. When WP Job Manager is active the frontend job submission form is protected automatically — including the "save as draft" path — and a WP Job Manager job submissions switch appears under Protection targets on the General tab. WP Job Manager's own answer to submission spam is Google reCAPTCHA; this gives you the same protection without the third-party service or the puzzle your posters have to solve. Job listings run longer than comments and legitimately carry more links, so the form gets its own section on the Per-form tab and its own starting link limit: 10 links, where comments get 3. An ordinary job description linking to an about page, a benefits page, a team page and an application page already has four. If you have changed the site-wide link limit on the Guards tab, your setting applies to job listings too; set a limit on the Per-form tab to give them their own. It is also worth raising the minimum submit time there, well above the site-wide default — nobody writes a job description in three seconds, so a longer minimum costs genuine posters nothing and stops scripted submissions. The company website, video and Twitter fields are never counted as content links, so filling them in normally cannot trip the limit.

Does it replace WordPress's built-in comment moderation?

No — it complements it. Onsite Spam Guard's guards run before WordPress's own comment checks, and those built-ins still run underneath: the duplicate-comment check, the comment flood throttle, the Disallowed Comment Keys blocklist, and the "hold a comment with this many links" setting (all under Settings → Discussion). Its Keyword, Link limit, and Duplicate guards overlap those, so you can rely on either or both. What it adds on top is the honeypot, timing, signature, and behavioral checks core has no equivalent for, one settings screen with logging, and protection for WooCommerce reviews and Jetpack contact forms — not just comments. You can also go the other way and put WordPress's list to work everywhere: enable Also apply WordPress's Disallowed Comment Keys on the Guards tab and the plugin runs every protected submission through core's own blocklist — so the list you already maintain under Settings → Discussion starts covering reviews, Jetpack forms, and any form added through the plugin's API, not only comments.

Can it stop fake account registrations?

Yes. Turn on Account registration forms under Protection targets on the General tab. It covers the WordPress registration form, the WooCommerce My Account registration form, and BuddyPress signup — whichever your site has. It is off by default, because a mistake here stops a real person creating an account, which is worse than a rejected comment. The safest way to switch it on is to set that form to Monitor on the Per-form tab first, watch the spam log for a few days, and enforce it once you are happy with what it would catch. WooCommerce checkout is deliberately left alone. Accounts created while placing an order, after purchase, or through the WooCommerce REST API are never screened, so a customer is never turned away at the point of paying.

Could this lock me out of my site?

No. Onsite Spam Guard never touches logging in: it adds nothing to the login form and does not check login attempts at all. A refused registration, a blocked comment or a rejected form submission is not a failed login, so none of them can count towards a limit on failed login attempts that you might have from another plugin. You can also always add accounts yourself under Users → Add New, which is never screened, and neither is account creation at WooCommerce checkout or by administrators. The one thing worth knowing concerns the optional rate limit, which is off by default. It counts submissions per visitor address. If your site sits behind a proxy or CDN that the plugin is not set up for, every visitor can appear to come from the same address — so with the rate limit on, one busy minute could refuse everyone's submissions to your protected forms until that minute passes. It does not affect logging in. What this server sees, beneath Trust proxy headers on the Allowlist tab, tells you whether your site is in that situation. If you have been locked out of logging in by another plugin before, a shared address is a common cause there too: every failed attempt, from anyone, counts against the one address everybody appears to have. Adding your own IP address to that plugin's allow list is the usual safeguard.

Can I try a change before it starts blocking anything?

Yes. Turn on Monitor mode on the General tab and the plugin keeps checking every submission and recording what it would have blocked, but lets everything through. The spam log labels those entries Would have blocked, so after a few days you can see exactly what a new setting would have caught — including anything it would have caught by mistake — before you rely on it. You can also monitor a single form while the rest stay protected: on the Per-form tab, set that form's mode to Monitor. This is the safest way to switch on protection for a new form. When you are ready to decide, the Per-form tab sums it up beside each monitored form: how long it has been monitored, how many submissions would have been blocked and by which checks, a link to those entries in the spam log, and an Enforce this form link that switches it on. While monitor mode is on for the whole site, a notice on every admin screen reminds you that nothing is being blocked.

Does it work with caching plugins?

Yes. The timing and authenticity checks use a token whose signature does not expire (unlike a WordPress nonce, which would go stale on a cached page and block legitimate visitors), so full-page caching does not produce false positives.

Does removing the plugin clean up after itself?

By default, yes — deleting the plugin (not just deactivating it) drops its database table, removes all of its options, clears its scheduled task, and purges its transients, on every site of a multisite network. If you would rather keep your settings and logs (for example, before reinstalling), turn off Delete all plugin data when this plugin is deleted under Spam Guard → Settings → Logging first.

更新日志:

1.7.2 1.7.1 1.7.0 1.6.0 1.5.1 1.5.0 1.4.0 1.3.0 1.2.1 1.2.0 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0