=== DWV Database Bloat Cleaner ===
Contributors: umrdev, digitalwebverse
Tags: database, cleaner, optimize, transients, revisions
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.1.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Safely remove unnecessary data to optimize your database size and server response time.

== Description ==

Over time, your WordPress database accumulates orphaned metadata, expired transients, auto-drafts, and post revisions that slow down server response times and bloat your backups. **DWV Database Bloat Cleaner** is a lightweight, strictly backend utility designed to safely identify and remove this digital garbage without slowing down your site.

Unlike bulky optimization suites that load unnecessary scripts on your frontend, this tool focuses on doing one thing well: it cleans your SQL tables safely using WordPress-native queries and secure AJAX execution.

### Features
* **Post Revisions Cleanup:** Remove thousands of old post revisions in one click.
* **Auto-Draft Removal:** Clear abandoned drafts cluttering the `wp_posts` table.
* **Expired Transients Sweep:** Delete temporary cached data that failed to clear itself from the `wp_options` table.
* **Orphaned Meta Deletion:** Safely remove abandoned rows in `wp_postmeta` left behind when posts are deleted.
* **Dry-Run Dashboard:** Always see exactly what will be deleted *before* you execute the cleanup.

== Installation ==

1. Upload the `dwv-database-bloat-cleaner` folder to the `/wp-content/plugins/` directory, or install it directly through the WordPress plugin screen.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to **Tools > DWV Bloat Cleaner** in your admin dashboard.
4. Review the detected bloat and click "Execute Cleanup".

== Frequently Asked Questions ==

= Is it safe to use on a live site? =
Yes. The plugin uses strict, narrow SQL scopes to target only known garbage data. It also provides a read-only preview of what will be deleted before you run the tool.

= Will this speed up my website? =
Yes, a leaner database means faster query execution, quicker admin dashboard load times, and significantly smaller backup files.

= Does this plugin run in the background? =
This free version operates manually to give you full control over when deletions happen. 

== Changelog ==

= 1.1.0 =
* UI improvements: Added native WordPress postboxes and database size tracking.
* Moved inline JavaScript to a dedicated enqueued file.

= 1.0.0 =
* Initial release.
* Added safe cleanup for post revisions, auto-drafts, expired transients, and orphaned post meta.
* Implemented dry-run admin dashboard with secure AJAX execution.