Janitorix Media Audit: a WordPress plugin that proves an image is unused before deleting it
Summary. Most "unused image" cleanup plugins for WordPress just guess — they show you a list and a delete button. I built Janitorix Media Audit to do the opposite: it scans every place an image could be referenced, scores each image on confidence and risk separately, and refuses to recommend deletion unless it can show its work.
A note on the name. This plugin was called Unused Image Cleaner until August 2026. The WordPress.org review team asked for a more distinctive name, so it is now Janitorix Media Audit. Same plugin, same code, new name.
The problem
Every WordPress media library fills up with images nobody uses any more — old banners, replaced logos, test uploads. The cleanup plugins that exist to fix this almost all work the same way: scan the uploads folder, flag anything that looks unused, and hand you a delete button.
The problem is that the cost of being wrong is not symmetric. Leaving an unused image costs a few kilobytes. Deleting one that is actually referenced somewhere — a Customizer background, an ACF field, a page-builder section — breaks your site, and you might not notice for weeks.
The solution
Janitorix Media Audit never blends "is this used?" into a single guess. Every image gets two separate judgements.
- Confidence — how sure the plugin is that the image is genuinely unused, based on scanners covering post content, Gutenberg blocks and synced patterns, full-site-editing templates, the Customizer, theme options, widgets, menus, Elementor, ACF, WooCommerce, and the theme's own PHP, CSS and JavaScript files.
- Risk — how much damage deleting it would cause if the plugin is wrong.
Here is why that split matters. A site logo that nobody explicitly references and a stray test upload can score identically on confidence — but they need opposite treatment. That is why risk is scored independently, and why the plugin will refuse to offer Trash for anything at medium risk or above, no matter how confident the scan is.
Requirements
- WordPress 6.0 or later
- PHP 7.4 or later
- No page builder required. Elementor is supported directly. Other builders — Divi, Bricks, Oxygen — fall back to a conservative scanner that blocks deletions it cannot verify, rather than guessing.
Getting started
- Install the plugin from the ZIP on GitHub Releases — the WordPress.org listing is still in review — and activate it from the Plugins menu.
- Open the new Janitorix menu in your WordPress admin sidebar.
- Click Start the first scan on the dashboard.
- Nothing is deleted automatically. Review the recommendations first.
How the scan actually works
Open any image in the results and you can see exactly which scanner found what, how strong each piece of evidence was, and why the plugin reached its conclusion. A confidence score you cannot inspect is not one you have any reason to trust.
Even a perfect scan reports 97 per cent, not 100. Proving an image is used takes one piece of evidence. Proving it is unused means proving the absence of evidence everywhere a theme or a page builder could hide a reference — and no scanner can promise "everywhere". The plugin reports that honestly instead of rounding up.
What it refuses to do
- Will not recommend deleting anything if it could not search enough of the site. Below 70 per cent scan coverage it says so and asks for a rescan instead.
- Will not offer Trash for anything scored medium risk or above.
- Will never delete a site's logo, icon, or header. Those are refused outright, not just scored low.
- Will not touch an image uploaded in the last 24 hours.
- Never deletes anything in one step. Trash first, always — permanent deletion only happens from the Trash afterwards.
Common mistakes to avoid
- Deleting straight from a first scan. Always read the confidence and risk breakdown per image before trashing anything.
- Assuming 100 per cent coverage is possible. A page builder can assemble an image URL at render time that no static scan can see. Trash first, empty it later.
- Ignoring a low coverage warning. If the dashboard says coverage is below 70 per cent, rescan before acting on any recommendation.
FAQ
- Can it delete an image my site is actually using?
- That is the exact failure mode the whole design exists to prevent — coverage floors, risk ceilings and never-delete rules all sit between a scan and any action. But no scanner can see a URL assembled at runtime. Trash first, and check before emptying it.
- Does it support my page builder?
- Elementor is supported directly. For builders it does not fully understand — Divi, Bricks, Oxygen — a fallback scanner blocks deletions rather than guessing. It simply will not raise the confidence score for those images.
- Is anything deleted automatically?
- No. Nothing is deleted without you clicking, and nothing is deleted in one step. Trash first, always.
- What happens if I uninstall it?
- Every table and option the plugin created is removed. Your media is never touched.
Conclusion
If you have ever been nervous about running a media cleanup plugin because you were not sure what it would take with it, that hesitation is exactly what Janitorix Media Audit is built around — score confidence and risk separately, show the evidence, and never delete in one step.
Source on GitHub All my plugins