Cardea – Proof-of-Work Comment Spam Protection
Are you tired of anti-spam plugins that bloat your site, inject third-party tracking, or constantly upsell you on premium SaaS subscriptions? Are you looking for a straightforward, lightweight solution that just protects your comments without the extra baggage? Then Cardea is the right tool for you. Cardea is a radically simple, zero-dependency Proof-of-Work (PoW) comment spam protector. Developed transparently on GitHub as a purely open-source project, it does one thing and does it perfectly: it stops automated bot spam on native WordPress comments. Why Choose Cardea? Cardea offers distinct advantages for site owners who value simplicity, privacy, and performance: Hyper-Focused & Zero Bloat – Cardea is strictly dedicated to the native WordPress comment system. Unlike multi-purpose anti-spam plugins that inject heavy compatibility layers for various form builders and e-commerce platforms, Cardea remains extremely lightweight and performant—protecting only what you need protected. 100% Standalone & Sovereign – No external API keys. No commercial SaaS tiers. No phone-home telemetry. Cardea is entirely self-hosted and self-contained. Your comment protection never depends on a third-party service staying alive. Strict Privacy (GDPR Compliant) – Because the Proof-of-Work computation happens locally in each visitor’s browser, there are no tracking cookies, no user profiles, and no third-party data transfers. Unlike cloud-based CAPTCHA solutions, Cardea transmits nothing to external servers—making it inherently GDPR-friendly. Reduced Attack Surface – By doing one thing perfectly (protecting native comments), Cardea avoids the security vulnerabilities inherent in massive, multi-ecosystem integrations. A focused codebase means fewer CVEs and tighter security. Plug-and-Play Simplicity – No complex routing rules. No integration toggles. No configuration mazes. Users simply activate Cardea and their discussion threads are protected immediately. To view the source code, contribute, or report issues, visit the Cardea GitHub Repository. How It Works Challenge Generation: When a page with a comment form loads, the server generates a cryptographically signed challenge using HMAC-SHA256. No database write occurs at this stage. Client-Side Mining: When a user focuses on the comment textarea, a JavaScript Web Worker begins mining in the background. Solution Discovery: The worker repeatedly hashes the challenge string (nonce + timestamp + salt) with incrementing counter values until it finds a hash with the required number of leading zeros. Server Verification: On submission, the server first verifies the HMAC signature (ensuring the challenge wasn’t tampered with), then validates the PoW solution, and finally stores a transient to prevent replay attacks. Features Zero Database Bloat on Load – Challenges are generated using stateless HMAC signatures, meaning the plugin requires exactly zero database writes when a visitor loads a page. Zero Dependencies – No external APIs or services required. Client-Side Mining – Heavy computation happens in the user’s browser using Web Workers. Deferred Execution – The cryptographic mining engine only spins up when a user interacts with the comment field, ensuring casual readers incur zero performance penalty. Self-Cleaning Replay Protection – Server-side state is only stored upon a successful comment submission to prevent bot replay attacks, and expired tokens are automatically swept by WordPress cron. Server-Side Verification – Server verifies HMAC signature first, then performs SHA-256 PoW validation. Configurable Difficulty – Adjust the number of leading zeros required (1-8). Configurable Time Window – Set how long challenges remain valid (5-120 minutes). Non-Intrusive – Works transparently for legitimate users; spammers must complete the PoW challenge. WordPress Standards – Follows WordPress coding standards and best practices. Privacy First (GDPR Friendly) – No cookies, no user tracking, no CAPTCHA popups, and absolutely zero data sent to third-party cloud APIs. Smart Pathway Protection – Flawlessly protects frontend forms and blocks XML-RPC botnets, while seamlessly allowing native Trackbacks and authenticated REST API requests. Page Caching Compatible – Uses dynamic REST API endpoint to fetch fresh challenges, ensuring compatibility with edge caching (Cloudflare, Varnish) and full-page caching plugins. Logged-In User Bypass – Skips PoW challenge for authenticated users, eliminating unnecessary CPU usage on the frontend. Architecture & Testing Cardea is built with an enterprise-grade engineering stack focused on reliability and performance: Frontend Architecture: * Zero-dependency JavaScript using native Web Crypto APIs (crypto.subtle) * Web Workers for background cryptographic mining (non-blocking UI) * Dynamic challenge fetching via REST API (compatible with page caching) * Skip PoW for logged-in users (zero CPU overhead for authenticated commenters) Backend Architecture: * Localized replay protection using WordPress transients * Auto-cleaning expired tokens via WordPress cron * Single verification pass: signature check + PoW validation Testing Stack: * PHPUnit – Backend logic verification (HMAC generation, challenge validation, replay prevention) * Jest – Cryptographic worker validation (difficulty checking, solution finding, message interface) * Playwright – End-to-End browser testing integrated with WordPress Playground (full WordPress environment) This comprehensive testing approach ensures the plugin handles legitimate users seamlessly while actively blocking sophisticated bot attacks. Developer Rigor Cardea is built with an enterprise-grade engineering stack focused on reliability and performance: Architecture: * Zero Database Bloat on Load – Stateless HMAC signatures ensure zero database writes on page load * Self-Cleaning Replay Protection – Uses WordPress transients that auto-expire via cron * Deferred Execution – Mining only starts when user interacts with comment field Testing Stack: * PHPUnit – Backend logic verification (HMAC generation, challenge validation, replay prevention) * Jest – Cryptographic worker validation (difficulty checking, solution finding, message interface) * Playwright – End-to-End browser testing integrated with WordPress Playground (full WordPress environment) Cross-Theme Compatibility: * Uses HTMLFormElement.prototype.submit.call() to bypass DOM clobbering issues * Graceful fallback for browsers without Web Worker support
Top keywords
- cardea13×1.52%
- wordpress12×1.41%
- challenge9×1.06%
- zero9×1.06%
- comment8×0.94%
- pow7×0.82%
- replay7×0.82%
- user7×0.82%
- hmac6×0.70%
- mining6×0.70%
- testing6×0.70%
- validation6×0.70%
La Sentinelle antispam
Feel safe knowing that your website is safe from spam. La Sentinelle will guard your WordPress website against spam in a simple and effective way. It has antispam filters for comment forms and registration forms and can be extended to support plugins. The default settings should catch most spambots, and there is a settingspage to set it up according to your wishes. Current features include: 3 antispam features; Honeypot, Nonce, Form Timeout. These 3 spamfilters depend on JavaScript on the frontend. 1 antispam feature; Stop Forum Spam. Settingspage to set things up according to your wishes. Transparent to the visitor, no nagging with Captcha’s or other annoying things. By default no use of third-party services and no tracking of visitors. Lightweight and simple code. Logging for WordPress Comments and which spamfilter marked it as spam. Logging for Custom forms and which spamfilter marked it as spam. Statistics for every form how many spam submissions were blocked. WordPress forms that are protected: WordPress Comments form. WordPress Login form. WordPress Register form. WordPress Lost Password form. Form Plugins that are protected: Caldera Forms. Clean Login (Login form). Contact Form 7. Easy Digital Downloads (Login form, Register form). Everest Forms. Formidable Form Builder. Forminator. Newsletter Optin Box plugin (noptin) (standalone forms). Ultimate Member (Login form, Register form and Lost Password form). WooCommerce (Login form, Lost Password form). WPForms Lite. WP Job Manager plugin (submit job form when registering is enabled). Support If you have a problem or a feature request, please post it on the plugin’s support forum on wordpress.org. I will do my best to respond as soon as possible. If you send me an email, I will not reply. Please use the support forum. Translations Translations can be added very easily through GlotPress. You can start translating strings there for your locale. They need to be validated though, so if there’s no validator yet, and you want to apply for being validator (PTE), please post it on the support forum. I will make a request on make/polyglots to have you added as validator for this plugin/locale. How to choose an antispam plugin When you look through the WordPress Plugin Repository you will see more than a hundred antispam plugins. Which one is the best one? Short answer, there is no “best one”. No spamfilter and no method for spamfiltering is perfect. Slightly longer answer, you could try about twenty and choose the one that fits your needs best. But there is also a really long answer. There are different methods that can be used against spam, and every method has its drawbacks. In my opinion, having a low number of false positives is more important than perfectly marking all spam, you don’t want to miss out on important people or information. Nagging the user in some way has a similar effect, the user might not even want to bother with that and just walk away. Third party services: Services like Akismet, OOPSpam, Stop Forum Spam and also reCAPTCHA offer third party services to check for spam. This can be very effective, but you are giving user submitted data away to these third parties and are also giving your users up for tracking them. Captcha’s, reCAPTCHA and Quizz Questions: You are annoying your users and probably sending some of them away. This especially counts for reCAPTCHA for visitors who have third party cookies disabled. Blacklists: Often running behind the facts. That goes for the way of getting users off that list, and also in getting users on that list. Referer check: check if the Referer header is set correctly. You can never trust it is set correctly. Modern browsers are limiting the use of Referers, though for now that is mostly for third-party domains. JavaScript methods: Spammers often (always?) don’t use JavaScript, they just post the form with spammy data. Drawback for this method is that statistics say that about 1 percent of users has JavaScript disabled. Also, some websites have broken JavaScript, which might make the spamfilter break as well. Activation email for registering users. Users only get activated after clicking a link in an activation email. You still have all the non-activated users in your site however. You could have a bright idea about combining several methods, but then you get the drawbacks of all the methods you use. Another complication of choosing a good plugin is that most antispam plugins don’t tell you what methods they use. The documentation doesn’t tell you, and looking at the source code just leaves you confused at the chaos that it often is. My main motivation for writing this plugin is to offer a plugin that does spamfiltering with JavaScript methods in a simple and effective way. The claimed 1 percent of users that has JavaScript disabled will also be tech-savy enough to enable it again for your website. Compatibility This plugin is compatible with ClassicPress. Contributions This plugin is also available in Codeberg.