=== Media Sifter ===
Contributors: wajahatmubashir
Tags: media, media library, cleanup, attachments, unused files
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL2+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find and remove unused/orphan media files safely. Dry-run scan, preview, and bulk-delete to reclaim storage.

== Description ==

**Media Sifter** helps you reclaim storage by finding media files that are not used anywhere on your site. Run a safe **dry-run scan**, preview results, and **bulk-delete** only what you confirm.

### Features
- 🔍 **Scan for orphans** — detects media not referenced in posts/pages or attached to content.
- 🧮 **Storage stats** — see how many files and how much space can be recovered.
- 🧰 **Batch scanning** — avoids timeouts on large libraries.
- ✅ **Safe by default** — dry-run first; delete only after confirmation.
- 🔒 **Admin-only & secure** — capability checks and nonces on all actions.

### What counts as "in use"?
- Media **attached** to a post (parent set).
- Media **referenced by URL** in post content or basic meta (e.g., featured image).
- Resized variants (e.g., `-150x150`) linked to the base file.

> Note: Deep scanning of page builders (Elementor/Divi), custom fields, and complex meta references are Pro-candidate features.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via the Plugins screen.
2. Activate the plugin.
3. Go to **Media → Media Sifter** and click **Start Scan**.

== Frequently Asked Questions ==

= Is it safe? =
Yes. Scans are read-only. Deletions require explicit confirmation. Always keep a recent backup.

= Will it detect images used by page builders? =
The Lite version does a conservative scan. Deep scanning for builders/ACF is planned for a Pro version.

= Can I restore deleted files? =
Deletion is permanent. Always back up your site before deleting.

== Screenshots ==

1. Scan screen with progress, results, and bulk actions.

== Changelog ==

= 1.0.0 =
* Rebranded as Media Sifter with proper WordPress.org prefixes.

== Upgrade Notice ==

= 1.0.0 =
WordPress.org submission ready with proper prefixes and branding.
