Description
Antisy is an anti-bot service from Switzerland. This plugin connects your WordPress forms to it. The forms you choose are checked by Antisy on your server before a message is accepted. A visitor is not asked to solve anything.
What you need
- An Antisy account and its two keys: a public key (32 characters) and a secret (64 characters). You get them on the Antisy dashboard. The free tier includes 1 site and 2,500 checks a month. The paid tiers are listed on the Antisy site.
- The service is for professional use: companies, independents and associations, for their activity. It is not offered to consumers. Read the terms before you sign up (links below).
What it does
- Protects the Contact Form 7 and WPForms (Lite) forms that you tick, one by one.
- Adds the Antisy script only on pages that show a protected form. Never on the login page, in the administration or in a feed.
- Asks Antisy to check each submission of a protected form. A submission that Antisy refuses is not accepted by your form.
- Shows one message to a refused visitor, whatever the reason. It never says why. On Contact Form 7, it is the “spam” message you wrote in the form.
- Sends nothing to Antisy until you have saved both keys and switched protection on.
- Has a Test button on the settings screen. It tells you whether the protection is active, whether Antisy accepts your secret, whether the quota of your tier is reached, and whether your server can reach Antisy.
- Tells you on the settings screen, and in two notices you can dismiss, when Antisy refuses your secret, when some submissions went through without a check, and when the quota of your tier is reached.
- Adds a suggested text to the Privacy tool of WordPress (Settings, Privacy, Policy Guide), dated, with a link to the online model.
- Ready for translation (text domain
antisy). Translations come from translate.wordpress.org; a language with no translation shows English.
When Antisy does not answer
The plugin follows the rule that Antisy documents for its own examples, with one limit added.
- It lets the submission through when Antisy cannot be reached: network down, no answer within 3 seconds, or an HTTP 502, 503 or 504 reply. The submission is counted, and the settings screen shows the count of the last 24 hours. A notice appears if it happens more than 10 times in 24 hours.
- It lets through at most 20 submissions an hour this way (the hour is counted in UTC, from o’clock to o’clock, and the limit is exact even when many visitors send at the same moment). The next ones are refused until Antisy answers again or the next hour starts, so that a long outage does not leave your forms open to robots. The figure 20 is a first estimate. A developer can change it with the filter
antisy_fallback_budget, which takes a whole number of 1 or more. - It refuses in every other case: HTTP 500 or any other 5xx, 429, a redirection, a 4xx error, a reply it cannot read, a refusal from Antisy, or a token that does not have the form of an Antisy token (
arand a digit, a dot, then letters, digits,-and_), which it does not even send. - Every one of these failures is still refused each time, but the PHP error log gets one line an hour for each kind of failure (the hour is counted in UTC): a robot that sends false tokens cannot fill your log.
- The limit of 3 seconds covers the whole call when WordPress uses cURL, which most hosts do. Without cURL, WordPress can wait up to 10 seconds just to connect, and the plugin cannot shorten that.
A change to this rule is written in the changelog.
Not covered in this version
- WordPress login and registration. Antisy’s simple mode does not tie a token to the person who presents it, so it is not suited to a login.
- WooCommerce checkout and account pages, comments, Elementor Forms, Gravity Forms.
- Multisite networks.
- Trackbacks and pings (they arrive without a form).
A cookie or consent manager that blocks scripts, or an optimization plugin that combines, delays or copies scripts, can stop the Antisy script from running. The visitor is then refused when Antisy’s collection is on. Exclude the script api.antisy.com/v1/i/l.js from such plugins. Whether the script may load without consent on your site is a question for your own legal adviser.
Tested with
WordPress 6.8 and 7.1, PHP 7.4, 8.3, 8.4 and 8.5, Contact Form 7 6.1.7 and 6.2.5 (6.2 needs WordPress 7.1 and PHP 8.3, which is Contact Form 7’s own requirement), WPForms Lite 2.0.4. Also run with Autoptimize, LiteSpeed Cache (JavaScript minified, combined and delayed) and WP Super Cache. With LiteSpeed Cache, and with any plugin that delays or combines scripts, exclude api.antisy.com/v1/i/l.js. Without this exclusion, some visitors can be refused.
Source
The plugin has no build step: the files in the package are the source, and none is minified. The Antisy script that runs in the browser is served by Antisy (see below), not included in the plugin.
External services
This plugin uses the Antisy service, run by Antisy Sàrl, Switzerland. It cannot work without it. The only host it contacts is api.antisy.com.
What leaves the visitor’s browser, and when
When a page shows a protected form and protection is on, the browser loads a script from https://api.antisy.com/v1/i/l.js. When the visitor sends the form, the script sends to Antisy the visitor’s IP address, the browser’s User-Agent and technical measurements of the browser and the device, and receives a short-lived token. The token is added to the form as the field antisy-token. The full list of data and how long Antisy keeps it are on the privacy page below.
What leaves your server, and when
- For each submission of a protected form, your server sends one request to
https://api.antisy.com/v1/siteverify. The body holds your secret and the token, and nothing else: not the visitor’s IP address, not the content of the form. The request names the plugin and its version in the User-Agent header (Antisy-WordPress/<version>) and not your site address. - When you click Test on the settings screen, your server sends one request to the same address, with your secret, an empty token and the field
self_check. Up to 2 tests an hour are not counted in your quota; more than that are counted like a submission. Nothing else on that screen sends a request.
What never happens
- No request goes to Antisy when the plugin is activated, or before you have saved both keys and switched protection on. The Test button is the one request you ask for yourself.
- No usage data, no update check, no call home.
What the plugin keeps on your site
Your two keys (the secret only if you did not put it in wp-config.php), the list of forms you ticked, a count of the submissions that went through without a check in the last 24 hours, a few facts about the last answers of Antisy (for example that the secret was refused), its version number, and one small row an hour at most for each kind of failure, which keeps the log short. It keeps no data about visitors. Removing the plugin from the Plugins screen deletes all of it.
Terms and privacy
- Terms of service: https://antisy.com/en/terms
- Privacy policy: https://antisy.com/en/privacy
This plugin does not make your site compliant with any law. You remain responsible for your own privacy notice and for the legal basis of what your site collects.
Installation
- Install and activate the plugin.
- Create an account on the Antisy dashboard and copy the two keys of your site. Declare your domain there, with and without
www.. - Go to Settings, then Antisy. Paste the public key and the secret. Tick “Check the forms ticked below with Antisy”. Tick the forms to protect. Save.
- Click “Test the protection”. Read what the screen says.
- If you use a page cache plugin, clear its cache. A page cached before you switched protection on has no Antisy script, and its visitors are refused.
Where to keep the secret
You can put it in wp-config.php, above the line “That’s all, stop editing!”. It then stays out of the database and of its backups:
define( 'ANTISY_SECRET', 'your secret' );
You can set the public key there too with ANTISY_SITE_KEY. A value in wp-config.php wins over the settings screen, and the screen shows it as read-only. If you cannot edit wp-config.php, paste the secret in the settings field. It is write-only: the screen shows only its first four characters. Any plugin on your site can read what is saved in the database. wp-config.php keeps the secret out of the database and of its backups, but it does not protect it from other plugins: they run in the same PHP and can read the constant. Install only plugins you trust.
If you already protect a form with code of your own, remove that code before you activate the plugin, or each submission is checked twice and the second check fails.
FAQ
Do I need an Antisy account?
Yes. Without the two keys, the plugin does nothing and sends nothing.
Does it slow my site?
The script is loaded only on pages with a protected form, with defer. The server check runs once per submission and gives up after 3 seconds (with cURL; see “When Antisy does not answer” above).
What if Antisy is down?
Submissions go through, up to 20 an hour, and the plugin counts them. Past that they are refused until Antisy answers again. See “When Antisy does not answer” above.
Why was a real visitor refused?
Most often the Antisy script did not run: a consent manager or an optimization plugin blocked or rewrote it, or your content security policy does not allow it. The settings screen lists what to check, with the exact sources to add to a content security policy.
I switched protection on and every visitor is refused.
Clear the cache of your page cache plugin. Pages cached earlier do not carry the Antisy script. Then use the Test button.
What does the Test button tell me?
One of: the protection is active; it is not active (browser collection is off on your Antisy site, or the site is suspended); the keys are test keys; Antisy refuses the secret; the quota of your tier for the month is reached (see your usage on the Antisy dashboard, or move to a higher tier); Antisy cannot be reached from your server; or Antisy had an error. Each comes with what to do.
Does it protect the login page?
No. See “Not covered in this version”.
Where do I find the text for my privacy policy?
In Settings, Privacy, Policy Guide. The plugin adds a suggested text there. Adapt it, and have it checked for your site.
How do I report a security issue?
Write to support@antisy.com. A person reads it. Please do not post a vulnerability in the public support forum.
Changelog
0.1.3
- Changed: the plugin no longer ships translation files and no longer loads any. WordPress loads the translations of translate.wordpress.org for the text domain
antisy. Until a language has one, that language shows English. - Fixed: the token field of a submission is validated (shape and length of an Antisy token) and sanitized as soon as it is read. Any other value is refused without a request to Antisy, as before.
0.1.2
- Changed: the name shown on wordpress.org and on the Plugins screen is “Antisy – CAPTCHA Alternative & Anti-Spam”. The slug, the text domain and the menu entry (“Antisy”) do not change; the title of the settings page and the Privacy tool use the long name.
- Changed: the readme says what the free tier includes (1 site, 2,500 checks a month).
- Changed: every failure that is not an outage (an HTTP 500 or other 5xx, 429, a redirection, a 4xx error, a reply that cannot be read, a refused secret, an error of the plugin) is written to the PHP error log once an hour (UTC) for each kind of failure, counted with one atomic row in the options table. A robot that sends false tokens can no longer fill the log. The submissions are refused as before.
- Added: the Test button says when the quota of your tier for the month is reached, and what to do (see your usage on the Antisy dashboard, or move to a higher tier), instead of “Protection is not active”.
- Fixed: the rows of the counter are deleted in SQL, by name, so that they no longer fill the
notoptionscache of WordPress. - Fixed: the option
antisy_unavailable, which version 0.1.0 left behind, is deleted at the first load after the update, not at the next outage. The plugin now stores its version number to run this once. - French and German updated.
0.1.1
- Fixed: the choice of forms is no longer lost when a form plugin is switched off or when a site has more than 200 forms.
- Fixed: protection can be switched off when both keys are set in
wp-config.php. - Fixed: with WPForms Pro, the check runs after the other filters on the errors of a form.
- Fixed: a form shown after the footer scripts were printed now gets the Antisy script.
- Changed: while Antisy does not answer, at most 20 submissions an hour go through unchecked (filter
antisy_fallback_budget), counted exactly with one row an hour in the options table; the next ones are refused. The log has one line when an outage starts and one when the hour’s limit is reached, and nothing is written to the database past the limit. - Changed: a token that does not have the form of an Antisy token is refused without a request to Antisy.
- Changed: the Test button names a suspended site as a possible cause when protection is not active, says when the public key is missing, and states that up to 2 tests an hour are not counted in the quota.
- Changed: clearer texts on
wp-config.php, on the 3-second limit without cURL and on LiteSpeed Cache. French and German updated.
0.1.0
- First version: public key and secret (also from
wp-config.php), switch, Contact Form 7 and WPForms (Lite) adapters, the fallback rule above, a count of submissions that went through without a check, clean uninstall. - Settings screen with the Test button, two dismissible notices, help for refused visitors, and the suggested privacy text.
- English, French and German.