Skip to content
Antisy
Documentation · WordPress plugin

The WordPress plugin

The Antisy plugin checks Contact Form 7 and WPForms submissions on your server, without asking the visitor anything. Its page is on wordpress.org.

What you need

An Antisy account and its two keys. The service is for companies, independents and associations, for their activity; it is not offered to consumers. Read the terms before you sign up. The tiers and what each includes are on the pricing page.

Install the plugin

  1. Install the plugin from its page on wordpress.org, or in WordPress: Plugins, Add New Plugin, search “Antisy”. Activate it.
  2. In the Antisy dashboard, declare the domain of your site, with and without www., then copy the two keys of the site.
  3. In WordPress, open Settings, Antisy. Paste the public key and the secret. Tick “Check the forms ticked below with Antisy”, then the forms to protect. Save.
  4. Click “Test the protection” and read what the screen says.
  5. If a cache plugin keeps your pages, clear its cache. A page cached before you switched protection on has no Antisy script, and its visitors are refused.

Nothing goes to Antisy when you activate the plugin, or until both keys are saved and protection is on.

A form already protected by code of your own

Remove that code before you activate the plugin. Otherwise each submission is checked twice, and the second check fails.

The two keys

The public key has 32 characters, the secret 64. The dashboard creates them: there the public key is called the public identifier, and the secret the verification secret (see keys and test environments). On the settings screen, the secret is write-only: the screen shows only its first four characters.

You can also put the keys in wp-config.php, above the line that says to stop editing (“That’s all, stop editing!”). The secret then stays out of the database and of its backups.

wp-config.php
define( 'ANTISY_SITE_KEY', 'YOUR_PUBLIC_ID' );
define( 'ANTISY_SECRET', 'YOUR_VERIFICATION_SECRET' );

A value in wp-config.php wins over the settings screen, which shows it as read-only. It does not hide the secret from other plugins: they run in the same PHP and can read the constant. Install only plugins you trust.

The forms to tick

The plugin protects Contact Form 7 and WPForms (Lite). You tick the forms one by one, in Settings, Antisy.

The Antisy script loads only on pages that show a protected form. Never on the login page, in the administration or in a feed. When the form is sent, the plugin asks Antisy to check the message; if Antisy refuses it, your form does not accept it.

A refused visitor sees one message, whatever the reason: the plugin never says why. In Contact Form 7, it is the “spam” message you wrote in the form.

This version does not cover:

  • 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;
  • the WooCommerce checkout and account pages, comments, Elementor Forms, Gravity Forms;
  • multisite networks;
  • trackbacks and pings, which arrive without a form.

For comments, a hand-written form or another form tool, the WordPress guide shows the manual method, with its code.

The “Test the protection” button

It sends one request to Antisy with your secret and an empty token, and tells you where you stand. The answer is one of these, each with what to do:

  • 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, which protect nothing;
  • Antisy refuses the secret;
  • your server cannot reach Antisy;
  • Antisy had an error.

Up to 2 tests an hour are not counted in the quota of your tier; more than that are counted like a submission. Nothing else on that screen sends a request.

The settings screen, and two notices you can dismiss, also tell you when Antisy refuses your secret, when some submissions went through without a check, and when the quota of your tier is reached.

When Antisy does not answer

The plugin follows the rule that this documentation gives for its examples (when the API does not answer), 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. Each submission let through 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 an hour for each site. 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 submissions are refused until Antisy answers again or the next hour starts, so 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 (it does not even send it).

The 3 seconds cover the whole call when WordPress uses cURL, which is the case on most servers. 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 of the plugin.

Cache and optimization plugins

A cache or optimization plugin that combines, delays or copies scripts can stop the Antisy script from running. When collection is on for your Antisy site, the visitor is then refused. Exclude api.antisy.com/v1/i/l.js from such plugins.

The plugin has been tried 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 the script: without this, some visitors can be refused. After you switch protection on, clear the cache of your pages.

The same remedy applies to a cookie or consent manager that blocks scripts. Whether the script may load without consent on your site is a question for your own legal adviser.

If real visitors are refused, check in this order: the cache cleared, the script excluded from the optimization plugins, then the content security policy (CSP) of your site, which must allow the script (CSP policy). The settings screen lists what to check, with the exact sources to add to a CSP.

The versions it was tried with

The plugin has been tried 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 and WPForms Lite 2.0.4. Contact Form 7 6.2 needs WordPress 7.1 and PHP 8.3: that is Contact Form 7’s own requirement. The plugin itself needs WordPress 6.8 or later and PHP 7.4 or later. For any other version we say nothing: try it on a copy of your site.

Privacy

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 list of data and how long it is kept are on the page data collected and privacy.

For each submission of a protected form, your server makes one request to https://api.antisy.com/v1/siteverify. It holds your secret and the token, nothing else: not the visitor’s IP address, not the content of the form. It names the plugin and its version in the User-Agent header (Antisy-WordPress/<version>), not your site address. The Test button sends one more request, the one you ask for yourself.

The plugin sends no usage data, does not check for updates with us and calls no one but api.antisy.com.

On your site, it keeps 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, and a few facts about the last answers of Antisy, for example that the secret was refused. It keeps no data about visitors. Removing it from the Plugins screen deletes all of it.

It also adds a suggested text, dated, to the Privacy tool of WordPress (Settings, Privacy, then the policy guide), with a link to the online model. Adapt it and have it checked for your site. The plugin does not replace your own privacy notice: you remain responsible for it and for the legal basis of what your site collects. See Antisy’s privacy policy.