=== Database Cleanup DL ===
Contributors: devlemon
Tags: database cleanup, database optimization, revisions, transients, cleanup
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Clean unnecessary WordPress database data with clarity and control.

== Description ==

Database Cleanup DL helps WordPress administrators locate and safely remove unnecessary data that accumulates over time — post revisions, trashed content, spam comments, expired transients, and orphaned metadata.

**How it works**

The plugin follows a strict analyse → inform → select → confirm → clean flow:

1. **Scan** — click "Scan Database" to count items in each category. Nothing is modified.
2. **Select** — choose only the categories you want to remove.
3. **Confirm** — review exactly what will be deleted before proceeding.
4. **Clean** — only the selected categories are removed.

**What it cleans**

* Post revisions
* Trashed posts, pages and custom post types
* Spam comments
* Trashed comments
* Expired transients (active transients are never touched)
* Orphaned post meta (rows whose post no longer exists)
* Orphaned comment meta (rows whose comment no longer exists)

**What it never does**

* Does not run automatically or on a schedule.
* Does not clean anything without explicit administrator action.
* Does not remove active transients, plugin tables, user data, term data, WooCommerce data, or any data it cannot identify with certainty as unnecessary.
* Does not send any information to external servers.
* Does not track usage or collect analytics.
* Does not add any output to the front-end.

**Privacy**

Database Cleanup DL does not make any external HTTP requests and does not collect, transmit or store any data outside your own WordPress installation.

**Compatibility**

Works on single-site WordPress installations. Does not perform network-wide operations on Multisite.

== Installation ==

1. Upload the `database-cleanup-dl` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen in WordPress admin.
3. Go to **Tools → Database Cleanup DL**.
4. Click **Scan Database** to see what can be cleaned.

== Frequently Asked Questions ==

= Does scanning modify my database? =

No. The scan is completely read-only. No data is changed, deleted or updated during a scan.

= Does cleanup happen automatically? =

No. The plugin does not run on a schedule and does not clean anything without an explicit administrator action. There are no background processes, cron jobs or automatic routines.

= Should I create a backup first? =

A recent database backup is recommended before permanently deleting any data. Database Cleanup DL does not create backups and does not integrate with backup services.

= Does the plugin send database information anywhere? =

No. All operations run entirely within your WordPress installation. There are no external HTTP requests, no telemetry, no analytics and no usage tracking.

= Does it delete plugin tables? =

No. Database Cleanup DL only targets the seven specific categories listed in its description. It never drops or truncates tables.

= Does it remove active transients? =

No. Only transients whose expiration time has already passed are targeted. Valid, non-expired transients are never touched.

= What data does the orphaned meta scan target? =

Only meta rows whose referenced post ID or comment ID no longer exists anywhere in the database. The plugin does not guess based on meta key names or plugin activity.

= What happens when I uninstall the plugin? =

Only the plugin's own short-lived UI state transients are removed. The plugin does NOT run its database cleanup routine during uninstall and does not touch your site content.

= Is it compatible with Multisite? =

The plugin operates on the current site only. It does not iterate over all sites in a network.

== Screenshots ==

1. Database Cleanup DL scan screen — initial state before first scan.
2. Database analysis results — item counts per category with selection checkboxes.
3. Cleanup selection — administrator selects categories to clean.
4. Cleanup confirmation — explicit acknowledgement before any data is deleted.
5. Cleanup completed report — real counts of items actually removed.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
