Tedasuke Form Spam Guard

By tedasuke

0+ active installationsVersion 0.1.1

Spam protection for MW WP Form: a built-in check that needs no account, Google reCAPTCHA v3, or Cloudflare Turnstile.

Description

This plugin adds spam protection to every form made with MW WP Form. You do not need to edit your forms. Activate it and your forms are protected.

Choose one of three methods:

  • Built-in check – works immediately, with no account and no outside service. It stops automated submissions that do not run JavaScript, that fill in a field people cannot see, or that are made faster than a person can type. It does not stop a determined attacker who drives a real browser; use reCAPTCHA or Turnstile for that.
  • Google reCAPTCHA v3 – invisible to visitors. Needs a site key and secret key from Google.
  • Cloudflare Turnstile – usually invisible to visitors. Needs a site key and secret key from Cloudflare.

It is built for the way MW WP Form works:

  • Confirmation screens are fully supported. The check runs when the visitor presses “Confirm” and again when they press “Send”. Pressing “Back” never sends anything and is never blocked.
  • No timeouts while filling in a long form. The check is done at the moment a button is pressed, not when the page loads, so it cannot expire while the visitor is typing.
  • No lost inquiries when Google or Cloudflare is down. By default a submission is let through if the outside service cannot be reached. You can change this.
  • If keys are missing, forms stay protected. When reCAPTCHA or Turnstile is selected but the keys are not filled in, the built-in check is used instead.
  • Adds nothing that expires to the page. The plugin itself prints no nonce or time stamp into the form, so it does not make page caching any harder than MW WP Form already does.

The settings screen (Settings > Form Spam Guard) shows how many messages were sent, how many submissions were rejected, and the reason for the last rejection.

This plugin is not affiliated with or endorsed by the authors of MW WP Form, Google or Cloudflare.

External services

The built-in check does not contact any outside service.

If you select Google reCAPTCHA v3, this plugin uses the reCAPTCHA service provided by Google.

  • On pages that show an MW WP Form form, the visitor’s browser loads a script from www.google.com. Google receives the visitor’s IP address and browser information, and may set cookies, as described in its policies.
  • When a visitor presses a button on the form, your site sends the reCAPTCHA token produced in the visitor’s browser, together with your secret key, to https://www.google.com/recaptcha/api/siteverify to check it. No form contents are sent.
  • Google Terms of Service, Google Privacy Policy

If you select Cloudflare Turnstile, this plugin uses the Turnstile service provided by Cloudflare.

  • On pages that show an MW WP Form form, the visitor’s browser loads a script from challenges.cloudflare.com. Cloudflare receives the visitor’s IP address and browser information, as described in its policies.
  • When a visitor presses a button on the form, your site sends the Turnstile token produced in the visitor’s browser, together with your secret key, to https://challenges.cloudflare.com/turnstile/v0/siteverify to check it. No form contents are sent.
  • Cloudflare Website and Online Services Terms of Use, Cloudflare Privacy Policy

Neither service is contacted unless you select it and enter its keys.

Installation

  1. Install and activate MW WP Form.
  2. Install and activate this plugin. Your forms are now protected by the built-in check.
  3. Optional: go to Settings > Form Spam Guard to switch to Google reCAPTCHA v3 or Cloudflare Turnstile and enter your keys.
  4. Send a test message from your own form to confirm that it arrives.

FAQ

Do I need to change my forms?

No. Every form made with MW WP Form is protected automatically.

Does it work with the confirmation screen?

Yes. The check runs for “Confirm” and for “Send”. “Back” is never checked and never sends anything.

A real visitor says they cannot send the form. What should I check?

Open Settings > Form Spam Guard and look at “Reason for the last rejection”. A reason starting with browser_ means the visitor’s browser could not complete the check, for example because a script was blocked. If the reason is recaptcha_low_score, the visitor’s reCAPTCHA score was below your threshold; try lowering the score threshold.

What happens if Google or Cloudflare cannot be reached?

By default the submission is let through, so that no inquiry is lost. You can choose to reject submissions instead.

Does the built-in check store personal data?

No. It stores only counters (how many submissions passed and were rejected), the reason code of the last rejection, and a short-lived use count for each ticket. None of these contain form contents, names, e-mail addresses or IP addresses.

Can I leave one form unprotected?

Yes, with a filter: add_filter( 'spfmwf_protect_form', function ( $protect, $form_key ) { return 'mw-wp-form-123' === $form_key ? false : $protect; }, 10, 2 );

Screenshots

Changelog

0.1.1

  • Readme only: added screenshot captions and clarified one FAQ answer. The Japanese description is now provided as a translation. No changes to how the plugin works.

0.1.0

  • First release.