Directory / plugin

Smart Spam Cleaner

v2.3.1 · by Shivam Kumar

Remove spam users, posts, and comments using background processing with dynamic filters.

View on WordPress.org

About this plugin

Smart Spam Cleaner provides an efficient way to remove spam users, posts, and comments from your WordPress site. It uses background processing via WordPress cron jobs to handle large datasets without impacting your site’s performance.

Key Features

  • Dynamic Filtering – Configure your own spam keywords and email domains
  • Advanced Conditions – Use AND/OR logic to combine keyword and domain filters
  • Include/Exclude Domains – Specify which email domains to target or protect
  • Flexible Post Handling – Choose between moving posts to trash or permanent deletion
  • Background Processing – Uses WordPress cron jobs for non-blocking cleanup operations
  • Batch Processing – Processes users and posts in small batches to avoid server overload
  • Smart Detection – Identifies spam users based on customizable patterns
  • Detailed Logging – Comprehensive logging of all cleanup activities
  • Modern UI – Beautiful, responsive admin interface with progress tracking
  • Security – Built-in security measures including nonce verification and capability checks
  • Protect List – Emails and user IDs that are never deleted
  • Dry Run – Full batch walk that logs matches without deleting
  • Configurable Roles – Choose which roles to scan. Defaults to subscribers. Administrators are never deleted
  • Post Types and Statuses – Scan posts plus selected public types, including drafts, pending, and private when you turn those on
  • Comment Cleanup – Trash or delete comments that match the post keyword list
  • Preview – Sample matching users, posts, and comments before a cleanup
  • Cancel – Stop an in-progress cleanup between batches

What Gets Deleted

Users:
The plugin uses your configured filters to determine which users to delete:

  • Keyword Matching – Users with spam keywords in email, username, or display name
  • Domain Filtering – Users with email domains in your include list (or all domains except exclude list)
  • Condition Logic:
    • OR: Delete if user matches ANY keyword OR domain filter
    • AND: Delete if user matches ALL keyword AND domain filters
  • Only affects the roles you select. The default is subscriber
  • Never deletes users who have the administrator role

Posts:

  • Posts of the selected types and statuses that contain spam keywords in the title or content
  • Defaults to published posts
  • Uses your configured post keywords list
  • Deletion Mode (also used for comments):
    • Move to Trash: Items are moved to WordPress trash (recoverable)
    • Permanent Delete: Items are permanently deleted (irreversible)

Comments:

  • Approved and held comments whose content, author name, or author email matches the post keyword list
  • Spam and trash comments are left alone
  • Comments from protected emails or user IDs are skipped
  • Uses the same trash or permanent-delete mode as posts

Use Cases

  • Clean up spam user registrations
  • Remove bot-generated users
  • Delete users from specific spam domains
  • Clean up casino/gambling spam posts
  • Bulk delete spam comments authors
  • Protect legitimate users while removing spam

Safety Features

  • Defaults to the subscriber role and never deletes administrators
  • Protect list skips listed emails and user IDs even when filters match, including comment authors
  • Dry run and preview do not delete anything
  • Cancel stops the next batch; items already deleted stay deleted
  • Requires administrator privileges to run
  • Includes confirmation dialogs
  • Provides detailed logging for transparency
  • Always backup your database before running cleanup operations

Configuration

Default Settings

  • Batch Size – 500 items per batch
  • User Keywords – btc, binance, crypto, telegram, usd, tinkoff, money, trading, wallet, forex, meta, xrp, airdrop, bam, bet, eur, rub, invest, usdt, euro
  • User Domains:
    • Include: (empty – all domains)
    • Exclude: gmail.com
  • User Condition – OR
  • User Roles – subscriber
  • Post Keywords – casino, gambling, slots, bet, poker, blackjack, win money, jackpot, spin, roulette, wager, baccarat
  • Post Types – post
  • Post Statuses – publish
  • Content Deletion Mode – Move to Trash (recoverable, used for posts and comments)

Customization

You can modify the default settings through the admin interface or by adding the following to your wp-config.php file:

// Custom batch size
define('WWSSC_BATCH_SIZE', 1000);

Support

For support, feature requests, or bug reports, please visit our support page.

Privacy

This plugin does not collect, store, or transmit any user data outside of your WordPress installation. All operations are performed locally on your server.

Requirements

  • WordPress 5.0 or higher
  • PHP 8.0 or higher
  • Administrator privileges

Credits

Developed by WizzyWeb Private Limited

Important

Always backup your database before running any cleanup operations. This plugin performs destructive operations that cannot be undone.

Plugin tags