Lightweight, configurable anti-spam plugin for WordPress comments. Detects and blocks spam based on configurable rules without requiring external services.
WP AntiSpammer is a free, self-contained alternative to cloud-based anti-spam services. All detection runs locally on your server using configurable rules and lists. No data is sent to third parties.
- 13 configurable rules — each can be independently enabled/disabled
- Custom lists — blocked domains, email domains, TLDs, languages, and alphabets
- Batch processing — scan existing pending/approved comments against current rules
- Statistics dashboard — track detections by rule, daily history, and spam rate
- Two spam actions — mark as spam or hold as pending for manual review
- Lightweight — no external API calls, no JavaScript on the frontend, no database tables
| Rule | Description |
|---|---|
| Language detection | Blocks comments written in specific languages (requires minimum word count for reliable detection) |
| Alphabet detection | Blocks comments where a percentage of characters belong to a blocked script (Cyrillic, Chinese, Arabic, etc.) |
| Contains links | Any comment with a link is spam |
| Too many links | Comments exceeding a configurable link threshold |
| Blocked TLD | Links pointing to blocked country TLDs (.ru, .cn, .tr, etc.) |
| Blocked domain | Links pointing to specific blocked domains |
| Blocked email domain | Author email from a blocked domain (tempmail, throwaway, etc.) |
| Short comment | Comments below a minimum character length |
| Long comment | Comments above a maximum character length |
| Author name has URL | Author name field contains a URL |
| All caps | Comments written mostly in uppercase |
| Repeated characters | Excessive character repetition (e.g., "aaaa", "!!!!") |
| BBCode / spam markup | Comments containing [url], [link], [img] BBCode tags |
- Blocked domains — specific domains blocked in comment links
- Blocked email domains — email providers considered spam sources
- Blocked TLDs — country-code TLDs blocked in comment links
- Blocked languages — languages detected via common word analysis (Russian, Chinese, Japanese, Korean, Arabic, Hindi, Turkish, Vietnamese, Thai, Ukrainian)
- Blocked alphabets — character scripts: Cyrillic, Chinese (CJK), Japanese, Korean, Arabic, Thai, Devanagari, Bengali, Hebrew, Greek
For sites with existing comments, WP AntiSpammer can scan pending or approved comments in configurable batches (default: 50 per batch) to avoid server overload. Progress is shown in real-time via AJAX.
- Upload the
wp-antispammerfolder to/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
- Go to AntiSpammer in the admin menu
- Enable the rules you want and configure their thresholds
- Add items to the lists (domains, TLDs, languages, alphabets)
- Optionally run bulk processing on existing comments
No. All processing happens locally on your server. No external API calls are made.
Can I use this alongside Akismet?
Yes. WP AntiSpammer hooks into preprocess_comment with priority 1, so it runs before most other plugins. If a comment passes WP AntiSpammer, Akismet (or any other plugin) can still evaluate it.
Depending on your configuration, it's either marked as spam directly or held as pending for manual review.
The plugin uses a lightweight approach based on common word lists for each language. If the comment has fewer words than the configured minimum (default: 5), language detection is skipped to avoid false positives.
The plugin counts characters belonging to specific Unicode ranges (e.g., Cyrillic: U+0400–U+04FF). If the percentage exceeds the configured threshold (default: 50%), the comment is flagged.
- WordPress 5.6+
- PHP 7.4+
mbstringPHP extension
Fabio Baccaglioni
- Email: fabiomb@gmail.com
- GitHub: https://github.com/fabiomb
GPL-2.0-or-later. See LICENSE.