Rexivue Account Review and Cleanup

By vishvajit424

0+ active installationsVersion 1.0.0

Review suspected spam, fake registrations and unused users. Dry-run previews, protected accounts, audit log. WooCommerce and HPOS compatible.

Description

Rexivue Account Review and Cleanup helps administrators identify and remove spam registrations, fake accounts and unused users without risking real customers or business data.

Core principle: an account with no posts and no orders is unused, not proven spam. The plugin flags accounts for review; nothing is deleted unless you explicitly preview a selection and then confirm it.

What it checks

  • Authored content (all or selected post types), media uploads and comments.
  • WooCommerce orders through the WooCommerce order API (legacy storage and HPOS), by customer ID and, optionally, by billing email. Any order status protects the account by default.
  • Risk signals: disposable email domains (editable list), malformed addresses, username patterns, plus-address duplicates, same-domain sign-up bursts, links/markup in profile fields, random-looking usernames, recent sign-ups with no activity. Weights and thresholds are configurable. A score only ever means “review”.
  • Last login, honestly: recorded from plugin activation onward (plus WooCommerce last-active and live sessions). Everything else shows as Unknown, never guessed.

Safety

  • Dry-run mode is on by default. Previews always work; real deletion is disabled until you turn dry-run off.
  • A real cleanup needs a preview of exactly the same selection and options (valid 2 hours, single use) and typing DELETE.
  • Every account is re-validated immediately before deletion: protection rules, authored content in ALL post types, comments, orders, third-party retention hooks.
  • Never deleted by default: the logged-in user, administrators, shop managers, editors, users holding protected capabilities, users marked as protected, users with orders, users with content (unless you reassign it), users with comments.
  • Order records, billing details and addresses are never touched.
  • Scheduled runs only scan and email counts. Scheduled deletion is opt-in, needs a reviewed dry run of the exact criteria plus explicit confirmation, only ever matches accounts with zero content, media, comments and orders, never reassigns or deletes content, and pauses itself after repeated errors.

Third-party data

Only WooCommerce (orders, Subscriptions, Memberships when active) is checked. Other plugins’ relationships (bookings, tickets, LMS, custom tables) are NOT discovered. Protect such users manually or add a check with the smuc_retention_reasons filter.

Developer hooks

  • smuc_protection_reasons (filter): add reasons that make a user protected.
  • smuc_retention_reasons (filter): add reasons to keep a user (third-party data).
  • smuc_business_post_types (filter): post types that are business records and are never content-deleted.
  • smuc_before_delete_user (action): fires right before wp_delete_user().

Installation

  1. Upload the plugin through Plugins > Add New > Upload, or copy the rexivue-account-review-cleanup folder to wp-content/plugins/.
  2. Activate it. Activation creates three plugin tables and default options. It does not modify any user.
  3. Open Tools > Rexivue Account Review and Cleanup. Click Scan Users (read-only).
  4. Review results, protect accounts you want to keep, select users, and use Preview Cleanup.
  5. To delete for real: Settings > turn Dry-run mode off, then preview again and use Start Cleanup.

Multisite networks are not supported in 1.0 (the plugin refuses to activate there).

Server cron

Scheduled scans use WP-Cron. On busy or cached sites add define( 'DISABLE_WP_CRON', true ); to wp-config.php and call wp-cron.php every few minutes from a real cron job, for example: */5 * * * * wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

FAQ

Can I undo a deletion?

No. Take a database backup first. See docs/RISKS-AND-RECOVERY.md in the plugin folder.

What happens to a deleted user’s comments?

WordPress leaves them in place with a dangling user ID, so users with comments are kept by default.

What does “delete content” do?

It lets WordPress core remove everything the user authored: posts go to the Trash (lost for good when the Trash is emptied), media is deleted. Prefer “reassign”.

Is personal data stored?

The working scan table holds usernames and emails until the next scan, 30 days, or uninstall (if you enable data removal). The audit log stores user IDs only unless you enable usernames.

Screenshots

Changelog

1.0.0

  • Initial release.