WP Manifestindependent plugin directory
manifest / forms / classic-honeypot-for-cf7

Classic Honeypot for CF7

Classic Honeypot for CF7 adds a [honeypot] form tag to Contact Form 7 (CF7) that stops spam bots without a CAPTCHA.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/nilovelez/classic-honeypot-for-cf7/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Classic Honeypot for CF7

Classic Honeypot for CF7

A lean honeypot anti-spam field for Contact Form 7. A fork of the classic Honeypot for Contact Form 7 by Nocean, with no extra modules.

What it does

Most contact form spam is sent by bots that fill in every field they find. This plugin adds a [honeypot] form tag: an extra field that is hidden from people. If it gets filled in, Contact Form 7 flags the submission as spam.

It also includes an optional submission time check: a form submitted faster than a configurable number of seconds is treated as spam.

  • A [honeypot] form tag, with its own button in the Contact Form 7 form editor.
  • An optional submission time check.
  • Global settings (Contact > Honeypot settings) that each form tag can override.
  • Blocked submissions are recorded in the Contact Form 7 spam log, with the reason, and work with Flamingo.
  • No tracking, no external services.

About this fork

Classic Honeypot for CF7 is a fork of Honeypot for Contact Form 7, written by Nocean and contributors and released under the GPLv2 or later. It is based on version 2.1.1 and has been developed independently since then, in parallel with the original plugin.

This fork keeps the scope of version 2.1.1, the honeypot field and the time check, and maintains it for current versions of WordPress, PHP and Contact Form 7. All credit for the original idea and code goes to Nocean and the contributors of Honeypot for Contact Form 7.

This project is not affiliated with or endorsed by the authors of Honeypot for Contact Form 7 or Contact Form 7.

Compatibility with Honeypot for Contact Form 7

  • Same [honeypot] form tag and tag options: existing forms keep working.
  • Same public filters: wpcf7_honeypot_accessibility_message, wpcf7_honeypot_container_css and wpcf7_honeypot_html_output.
  • Settings are imported on first run.

The two plugins register the same form tag, so they cannot run at the same time. While Honeypot for Contact Form 7 is active, this plugin stays inactive and shows a notice.

Requirements

  • WordPress 6.5 or later
  • PHP 7.4 or later
  • Contact Form 7 6.0 or later

Installation

Install it from the WordPress plugin directory, or download a release zip and upload it in Plugins > Add New Plugin > Upload Plugin. Then add a honeypot field to a form with the Honeypot button of the Contact Form 7 editor.

See readme.txt for the full documentation, FAQ and changelog.

Development

The repository includes a WordPress Playground blueprint that installs Contact Form 7 and creates a page with a test form. Run it from the repository root, mounting the plugin from your working copy:

npx @wp-playground/cli server --blueprint ./blueprint.json --mount .:/wordpress/wp-content/plugins/classic-honeypot-for-cf7

The test form is at http://127.0.0.1:9400/honeypot-test/. Log in with admin / password.

On Windows, use --mount-dir . /wordpress/wp-content/plugins/classic-honeypot-for-cf7 instead of --mount, because --mount does not accept drive letters.

Building the release zip

The release zip is built with git archive from the repository root:

git archive --format=zip --prefix=classic-honeypot-for-cf7/ -o classic-honeypot-for-cf7-1.0.2.zip HEAD
  • --prefix puts the files inside a classic-honeypot-for-cf7/ folder, as WordPress expects when uploading a plugin zip. The zip file name includes the version, but the folder inside does not.
  • Development files, such as this README, the blueprint and the project notes, are left out through export-ignore rules in .gitattributes. To leave out a new development file, add it there.
  • Only committed files are included: commit your changes before building the zip.

License

GPLv2 or later, the same license as Honeypot for Contact Form 7.