Title: SWOT Form Spam Protection
Author: jiepei
Published: <strong>November 26, 2026</strong>
Last modified: November 26, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/swot-form-spam-protection.svg)

# SWOT Form Spam Protection

 By [jiepei](https://profiles.wordpress.org/jiepei/)

[Download](https://downloads.wordpress.org/plugin/swot-form-spam-protection.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/swot-form-spam-protection/#description)
 * [Reviews](https://wordpress.org/plugins/swot-form-spam-protection/#reviews)
 *  [Installation](https://wordpress.org/plugins/swot-form-spam-protection/#installation)
 * [Development](https://wordpress.org/plugins/swot-form-spam-protection/#developers)

 [Support](https://wordpress.org/support/plugin/swot-form-spam-protection/)

## Description

SWOT Form Spam Protection for Contact Form 7 and WPForms protects Contact Form 7
and WPForms forms from spam bots without Google reCAPTCHA, API keys, accounts or
third-party scripts. Everything runs on your own server.

#### Protection layers

Every submission is checked on the server, in this order:

 1. **IP block list** – blocked IP addresses are refused straight away.
 2. **Honeypot** – a hidden field with a per-site random name. Bots fill it in, people
    do not.
 3. **Rate limit** – a maximum number of submissions per IP address in a time window.
 4. **Single-use token** – each captcha is issued by AJAX and can be used only once.
 5. **Interaction check** – JavaScript confirms real keyboard, mouse or touch activity.
 6. **Time trap** – forms submitted faster than a person could are rejected.
 7. **Image captcha** – drawn with PHP GD. If GD is not available, a simple maths question
    is shown instead.

#### IP tracking and blocking

 * Every submission attempt is recorded with its result.
 * See which IP addresses submit most often and block them with one click.
 * Optional automatic blocking after repeated failed attempts.
 * Whitelist your own IP address. Local and private addresses are never blocked.
 * Old records are deleted automatically (30 days by default).

#### Supported form plugins

 * Contact Form 7
 * WPForms

#### How to add the captcha

**Contact Form 7:** edit the form and add `[cfcap_captcha]` where you want the captcha,
for example above the submit button.

**WPForms:** add a Content or Custom HTML field containing the shortcode `[cfcap_captcha]`,
or enter the form ID under Settings > SWOT Form Spam Protection and the captcha 
is added automatically above the submit button.

#### Optional credit label

A small “Protected by SWOT” label, linking to https://swot.com.my, can be shown 
under the captcha. It is **off by default**. Turn it on under Settings > SWOT Form
Spam Protection > “Credit label”. To override it for a single form, use `[cfcap_captcha
brand="on"]` or `[cfcap_captcha brand="off"]` (in Contact Form 7: `[cfcap_captcha
brand:on]`).

#### Privacy

When a visitor submits a form protected by this plugin, the plugin stores the visitor’s
IP address, browser user agent, the form ID and the result (passed or blocked) in
your own WordPress database. Records are deleted automatically after the retention
period you choose (30 days by default). IP addresses on the block list stay until
the block expires or you remove them. No data is sent to any external service. Suggested
privacy policy text is added under Settings > Privacy.

#### For developers

 * `cfcap_render_image()` – draws the captcha image (replace or tune to change difficulty).
 * `cfcap_messages` filter – change visitor-facing messages.
 * `cfcap_alphabet` filter – change the characters used in the code.
 * `cfcap_client_ip` filter – return the real visitor IP when the site is behind
   a proxy or CDN.
 * `cfcap_skip_private_ips` filter – return false to allow blocking of private addresses.

## Screenshots

[⌊The settings page.⌉⌊The settings page.⌉[

The settings page.

[⌊The captcha on a Contact Form 7 form.⌉⌊The captcha on a Contact Form 7 form.⌉[

The captcha on a Contact Form 7 form.

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/`, or install it from the Plugins
    screen in WordPress.
 2. Activate the plugin.
 3. **Contact Form 7:** edit a form and put `[cfcap_captcha]` where the captcha should
    appear (for example above the Submit button), then save.
 4. **WPForms:** add a Custom HTML (or Content) field containing `[cfcap_captcha]`,
    or enter the form ID under Settings > SWOT Form Spam Protection.
 5. Optional: open Settings > SWOT Form Spam Protection to adjust the checks, add your
    IP to the whitelist and manage blocked IPs.

## FAQ

### Does it need Google reCAPTCHA or any API key?

No. Everything is generated and checked on your own server.

### Does it need the PHP GD extension?

GD is used to draw the image. Without it, the plugin shows a simple maths question
instead.

### The captcha does not load and shows an error.

Your IP address may have been blocked by the automatic blocking after several wrong
answers. Open Settings > SWOT Form Spam Protection, remove the IP from the Blocked
IPs list and add it to the whitelist.

### The plugin sees the same IP address for all visitors.

Your site is probably behind a proxy or CDN. Use the `cfcap_client_ip` filter to
return the real visitor address from the header your proxy sets.

### Where can I see blocked attempts?

Under Settings > SWOT Form Spam Protection.

### Is any data sent to other websites?

No.

### What happens when I delete the plugin?

Deleting the plugin from the Plugins screen removes its settings, database tables(
submission history and blocked IPs) and scheduled task.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“SWOT Form Spam Protection” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ jiepei ](https://profiles.wordpress.org/jiepei/)

[Translate “SWOT Form Spam Protection” into your language.](https://translate.wordpress.org/projects/wp-plugins/swot-form-spam-protection)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/swot-form-spam-protection/),
check out the [SVN repository](https://plugins.svn.wordpress.org/swot-form-spam-protection/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/swot-form-spam-protection/)
by [RSS](https://plugins.trac.wordpress.org/log/swot-form-spam-protection/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * First public release.

## Meta

 *  Version **1.0.0**
 *  Last updated **1 minute ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [anti-spam](https://wordpress.org/plugins/tags/anti-spam/)[captcha](https://wordpress.org/plugins/tags/captcha/)
   [contact form 7](https://wordpress.org/plugins/tags/contact-form-7/)[honeypot](https://wordpress.org/plugins/tags/honeypot/)
   [WPForms](https://wordpress.org/plugins/tags/wpforms/)
 *  [Advanced View](https://wordpress.org/plugins/swot-form-spam-protection/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/swot-form-spam-protection/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/swot-form-spam-protection/reviews/)

## Contributors

 *   [ jiepei ](https://profiles.wordpress.org/jiepei/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/swot-form-spam-protection/)