=== PRBLEM Sweep ===
Contributors: prblem
Tags: cleanup, database, media, maintenance, cron
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.6.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Safe WordPress cleanup intelligence for database clutter, media, cron signals, plugin leftovers and guarded cleanup.

== Description ==

PRBLEM Sweep is a conservative WordPress maintenance utility built around a simple rule: understand first, classify risk, and never silently treat ambiguous data as disposable.

PRBLEM Sweep builds on Recovery Guard, Duplicate Media and Autoload Inspector with five focused maintenance areas:

* Cleanup Rules — configurable boundaries for revision retention, stale auto drafts, trashed posts, spam comments and trashed comments. Rules only narrow candidate sets; they never promote REVIEW data to SAFE.
* Cron Inspector — read-only WordPress Cron visibility with cautious naming signals when a hook resembles a plugin observed being removed. Cron is never unscheduled automatically.
* Plugin Leftover Intelligence v2 — pre-delete snapshots now include options, transients, tables, post meta keys, user meta keys, WordPress Cron hooks and active Action Scheduler hooks. All residue remains PROTECTED and inspection-only.
* Never Touch Guards — explicit owner protections for database cleanup categories, media attachment IDs, option names, tables and cron hooks. Database authorization and media actions check guards at action time.
* Before / After Reports — database cleanup actions record bounded candidate counts and database-footprint estimates before and after cleanup. Storage-engine allocation may remain stable even after rows are correctly removed.

Existing safeguards remain:

* Database cleanup creates bounded recovery points before removal and stops when a required snapshot cannot be stored.
* Duplicate media scanning uses SHA-256 and never treats duplicate bytes alone as permission to remove an attachment.
* Possible unused and duplicate media are re-checked immediately before being moved to WordPress Trash.
* Autoload inspection remains read-only.
* Naming similarity is evidence, not proof, so plugin residue deletion stays locked.

Compact workspaces keep the page short:

* Overview — Quick Sweep and a small intelligence queue.
* Database — Candidates / Cleanup Rules subviews.
* Media — Possible Unused / Duplicate Files subviews.
* Leftovers — compact removal history plus a collapsed seven-area residue inspector.
* System — Storage / Autoload / Cron / Never Touch / Recovery / Reports subviews.

Visit https://prblem.com/ for PRBLEM products.

== Changelog ==

= 1.6.0 =
* Refreshed the WordPress admin visual system to match the PRBLEM Sweep public brand: cream surfaces, charcoal panels and lime SafeClean accents.
* Added a live status ring and compact Database, Media, Leftovers and Recovery metrics to the main hero.
* Reworked Overview cards, primary cleanup CTA, status badges and workspace navigation for clearer hierarchy without changing cleanup policy or backend behavior.
* Preserved the tested 1.5.2 SafeClean, Recovery, Cron, media, leftover and Never Touch logic unchanged.

= 1.5.2 =
* Tightened Cron Inspector removed-plugin matching to prevent generic words such as check, update, plugin, cron, and task from creating false REVIEW signals.
* Exact cron hooks captured before plugin deletion now provide the strongest leftover evidence; fallback naming signals require a full slug or distinctive token boundary match.

= 1.5.1 =
* Prepared plugin metadata, licensing and readme content for WordPress.org distribution.
* Clarified recovery results by separating logical cleanup items from physical database rows restored.
* Fixed transient-pair recovery accounting so one cleanup item is reported as one restored item.
* Prevented active or reinstalled plugins from being reported as removed-plugin Cron leftovers when an older installation used a different folder name.
* Marked historical residue from a currently installed plugin as reinstalled/active and excluded it from active leftover counts.
* Improved duplicate-media scan diagnostics with attachment, readable-file, size-collision, hash-file and byte counters.
* Hardened WordPress.org Plugin Check compatibility for prepared queries, identifier placeholders and read-only admin request handling.
* Kept Cleanup Rules, Never Touch guards, read-only inspectors, Recovery Guard and media Trash safeguards unchanged.

= 1.5.0 =
* Added rule-aware cleanup boundaries for revisions, auto drafts, trash posts, spam comments and trash comments.
* Added read-only WordPress Cron Inspector with removed-plugin naming signals.
* Expanded Plugin Removal Watch to residue intelligence v2 across seven evidence areas.
* Added Never Touch guards for database categories, media IDs, options, tables and cron hooks.
* Database and media action-time checks now honor explicit guards.
* Added before/after cleanup reports with database-footprint snapshots and row-removal counts.
* Added compact Database Rules and System Cron / Guard / Reports subviews.
* Kept plugin residue deletion and cron unscheduling locked.

= 1.4.0 =
* Added bounded Recovery Guard for database cleanup actions.
* Cleanup is cancelled when a required recovery point cannot be stored safely.
* Added seven-day recovery retention, ten-point limit and 5 MiB per-point safety cap.
* Added restore conflict protection: existing post/comment IDs are never overwritten.
* Added manual SHA-256 duplicate-image scanning with 300-attachment and 256 MiB hash budgets.
* Duplicate media is never auto-deleted; only duplicate attachments that also pass the unused-media re-check can be moved to WordPress Trash.
* Added read-only Autoload Inspector with largest-option size signals and cautious possible-owner hints.

= 1.3.0 =
* Replaced the long single-page dashboard with compact workspace navigation.
* Added Overview, Database, Media, Leftovers and System workspaces.
* Added Quick Sweep for current SAFE database categories.
* Added selectable SAFE database bulk cleanup.
* Added orphan post meta, comment meta and term meta cleanup.
* Added guarded bulk media Trash actions with fresh candidate checks.

= 1.2.0 =
* Added the central SafeClean Engine.
* Added conservative risk policy for supported database cleanup categories.
* Added detailed plugin residue inspector and evidence scoring.
* Kept plugin residue deletion locked.
* Moved third-party WordPress admin notices outside the visual hero.

= 1.1.0 =
* Rebuilt the Admin UI around the PRBLEM visual identity.
* Added Visit PRBLEM.com links.

= 1.0.0 =
* Initial release.
