=== JWL Revision Cleaner ===
Contributors:      wyattle
Tags:              revisions, database, cleanup, elementor, optimization
Requires at least: 6.0
Tested up to:      7.0
Requires PHP:      8.2
Stable tag:        1.0.0
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Analyse, clean and optimize WordPress and Elementor revisions to improve performance and reduce database size.

== Description ==

**JWL Revision Cleaner** gives web agencies, freelancers, SEO consultants and site owners a professional admin interface to:

* **Analyze** WordPress and Elementor revisions in detail
* **Clean** excess revisions with secure, confirmed actions
* **Optimize** MySQL tables without manual SQL
* **Simulate** any cleanup before executing it
* **Log** every action with date, count and estimated gain

= Key features =

**Health score (0-100)**
Visual indicator with four levels: Excellent, Good, Average, Needs optimization.
Based on revision count, table size and Elementor data volume.

**Dashboard**
Eight stat cards: pages, posts, WP revisions, media, Elementor revisions, table sizes, total DB size.

**Detailed analysis**
Table listing every page and post with revision count, last modified date and Elementor data size.

**Simulation**
Estimate revisions to delete, postmeta rows affected and MB gain before any action. No data is deleted.

**Maintenance**
* Delete all revisions
* Keep last 5 / 10 / 20 revisions
* Delete orphan Elementor revisions
* Clean Elementor log data
* Clean expired transients
* Clean SEO plugin logs (Yoast, RankMath, AIOSEO)
* Optimize wp_posts, wp_postmeta, wp_options

**Safety first**
Every destructive action shows two confirmation dialogs, including a backup reminder.

**Automatic revision limit**
Applied via the `wp_revisions_to_keep` filter — no changes to wp-config.php.

**Activity log**
Last 150 actions with date, description, revision count and estimated MB gain.

= Compatibility =

* WordPress 6.x and 7.x
* Elementor and Elementor Pro
* PHP 8.2+
* Multisite compatible

== Installation ==

1. Upload the `jwl-revision-cleaner` folder to `/wp-content/plugins/`
2. Activate the plugin from the **Plugins** screen
3. Go to **JWL Revision Cleaner** in the admin sidebar

== Frequently Asked Questions ==

= Does the plugin modify wp-config.php? =
No. The revision limit is applied via the `wp_revisions_to_keep` WordPress filter only.

= Are cleanup actions reversible? =
No. Always back up your database before running any cleanup. Use the Simulation tab to preview the impact first.

= Is the plugin compatible with Elementor Pro? =
Yes. It detects and handles `_elementor_data` metadata in revisions.

= What are orphan Elementor revisions? =
Revisions whose post parent no longer exists in the database.

= Does it track users or send data externally? =
No. The plugin stores data only in WordPress options. No external calls, no tracking.

== Screenshots ==

1. Dashboard with health score and stat cards
2. Simulation tab — estimate gain before any action
3. Maintenance tab — all cleanup actions
4. Activity log

== Changelog ==

= 1.0.0 =
* Initial release
* Health score (0-100) with four levels
* Dashboard with 8 stat cards
* Detailed analysis per page/post
* Simulation mode (no deletion)
* 6 maintenance actions with double confirmation
* Database optimization (OPTIMIZE TABLE)
* Automatic revision limit via WP filter
* Activity log (150 entries)
* Multisite compatible
* PHP 8.2+ / WordPress 6.x-7.x / Elementor ready

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade needed.
