WP Captcha Guard
WordPress plugin exposing checkbox and invisible scoring captcha behind one interface, so any form renders and verifies the same way and switching version is a setting. Assets load per page and bundled dependencies are namespaced at build time, so it cannot collide with other plugins.

Stack
The problem
Public forms on a WordPress site, contact, registration, anything that hands work to a backend, collect bot traffic the moment they are indexed. The usual answer is a captcha plugin per form, and that answer has a cost: several plugins each load their own copy of the vendor script, each renders in its own way, and moving from checkbox captcha to the invisible scoring version means replacing the lot.
There is a subtler failure too. Captcha libraries ship their own dependencies, and when two plugins bundle different versions of the same library, PHP loads whichever came first and the other one breaks: a class of bug that surfaces only in production, on someone else's plugin.
Before → After
| Before | After |
|---|---|
| A separate captcha plugin per form | One component any form renders and verifies against |
| Switching v2 → v3 meant replacing the integration | Version is a setting; both implement the same interface |
| Each plugin loading its own vendor script | Script and styles registered once, enqueued only where needed |
| Bundled dependencies colliding with other plugins | Dependencies namespaced at build time: no collisions possible |
| Verification logic copy-pasted between forms | One verification path, one place to fix |
How it works
- One interface, two implementations. Checkbox and invisible scoring captcha both sit behind the same contract, so calling code renders a field and verifies a response without knowing which version is configured.
- The version is configuration. Switching between them is a settings change, not an integration rewrite: the field name and verification call stay the same on both sides.
- Assets load where they are used. Scripts and styles are registered centrally and enqueued only on pages that actually render a captcha, so a protected contact page does not tax every other page on the site.
- Dependencies are namespaced at build time.The build prefixes bundled library namespaces, so this plugin's copy of a shared library can never collide with a different version bundled by another plugin : the failure mode that makes captcha plugins fight each other.
- Forms opt in. Any form, core, WooCommerce or custom, renders the field and asks for a verdict at submit; nothing is patched into forms the site owner did not choose.
Key features
- Checkbox and invisible scoring captcha behind one interface
- Version switchable from settings without touching integration code
- Centralised script and style registration, enqueued per page
- Build-time namespacing of bundled dependencies: no plugin conflicts
- Single verification path reusable from any form
- Typed options object rather than scattered constants
Installation
- Upload the plugin folder to
/wp-content/plugins/and activate it - Enter the site key and secret from the captcha provider console
- Choose the captcha version: checkbox or invisible scoring
- Render the field in your form and call the verification helper on submit
- Submit the form once as a real user to confirm the verdict comes back positive
Open for contract collaboration
I am available for contract-based collaboration. If you have an interesting project idea, schedule a call via Calendly.
Schedule a 30-min call