{"id":370771,"date":"2026-10-18T07:51:21","date_gmt":"2026-10-18T07:51:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/media-guard-unused-media-cleaner-storage-optimizer-by-sajib\/"},"modified":"2026-10-18T11:37:43","modified_gmt":"2026-10-18T11:37:43","slug":"sajib-media-cleanup-manager","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/sajib-media-cleanup-manager\/","author":23568208,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.7.1","stable_tag":"1.7.1","tested":"7.1.3","requires":"6.5","requires_php":"8.0","requires_plugins":null,"header_name":"Sajib Media Cleanup & Storage Manager","header_author":"Mohamed Sajib","header_description":"Safely audit unused media, duplicate images, orphan files and stale thumbnails with reference-aware cleanup, delayed purge, and storage insights.","assets_banners_color":"","last_updated":"2026-10-18 11:37:43","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/sajib.dev.cv\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":53,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.7.0":{"tag":"1.7.0","author":"sajibsays","date":"2026-10-18 07:50:57","revision":3752706},"1.7.1":{"tag":"1.7.1","author":"sajibsays","date":"2026-10-18 11:37:43","revision":3752949}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.7.0","1.7.1"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Media Cleanup Manager dashboard with scan and storage overview.","2":"Review unused and duplicate media candidates before cleanup.","3":"Inspect original media and generated file variants with Media Family.","4":"Verify cleanup candidates before destructive operations.","5":"Safety Vault delayed-purge workflow and cancellation protection."}},"plugin_section":[],"plugin_tags":[238093,227565,253777,266154,219749],"plugin_category":[],"plugin_contributors":[287322],"plugin_business_model":[],"class_list":["post-370771","plugin","type-plugin","status-publish","hentry","plugin_tags-duplicate-images","plugin_tags-media-cleaner","plugin_tags-media-cleanup","plugin_tags-orphan-files","plugin_tags-unused-media","plugin_contributors-sajibsays","plugin_committers-sajibsays"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/sajib-media-cleanup-manager.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Sajib Media Cleanup &amp; Storage Manager is a WordPress media cleaner that helps administrators audit unused media, duplicate images, orphan files and stale generated thumbnails before anything is permanently removed. It builds a reference index across WordPress content and metadata, supports Elementor, ACF and WooCommerce workflows, identifies preliminary unused and duplicate-unused media, and applies multiple verification steps before cleanup. Because WordPress sites can include third-party or dynamically generated references, no automated scan can guarantee that every possible media reference is discoverable.<\/p>\n\n<p>Key features:<\/p>\n\n<ul>\n<li>Reference-aware Media Library audit.<\/li>\n<li>Exact second-pass cleanup plans before destructive operations.<\/li>\n<li>Final live verification immediately before cleanup.<\/li>\n<li>Safety Vault delayed-purge hold with cancellation and fresh verification before permanent deletion.<\/li>\n<li>Duplicate-unused detection using file hashes.<\/li>\n<li>Orphan-file discovery within standard WordPress date-based upload folders.<\/li>\n<li>Media Family inspection for original, generated and optimized variants.<\/li>\n<li>Stale derivative auditing with current-reference protection.<\/li>\n<li>Incremental scan fingerprints, storage insights and audit history.<\/li>\n<li>Background jobs designed to work reliably in shared-hosting environments.<\/li>\n<\/ul>\n\n<p>Sajib Media Cleanup &amp; Storage Manager does not treat an unattached image as automatically unused. Candidates must pass the plugin's verification workflow before they can become cleanup-ready.<\/p>\n\n<h4>Author<\/h4>\n\n<p>Developed by <a href=\"https:\/\/profiles.wordpress.org\/sajibsays\/\">Mohamed Sajib<\/a>.<\/p>\n\n<p>Portfolio: <a href=\"https:\/\/sajib.dev.cv\/\">sajib.dev.cv<\/a><\/p>\n\n<h3>Privacy<\/h3>\n\n<p>Sajib Media Cleanup &amp; Storage Manager performs media analysis inside the WordPress site. The plugin does not require an external account and does not intentionally transmit media-library contents to the author.<\/p>\n\n<h3>Source Code<\/h3>\n\n<p>This plugin does not use compiled, minified, transpiled, or generated application code.<\/p>\n\n<ul>\n<li>The distributed <code>assets\/admin.js<\/code> file is the human-readable JavaScript source used directly by WordPress.<\/li>\n<li>A matching source copy is also included at <code>assets\/src\/admin.js<\/code>.<\/li>\n<li>The distributed <code>assets\/admin.css<\/code> file is the human-readable stylesheet used directly by WordPress.<\/li>\n<li>A matching source copy is also included at <code>assets\/src\/admin.css<\/code>.<\/li>\n<li>PHP source is included in the plugin root and <code>includes\/<\/code>.<\/li>\n<li>No npm, webpack, bundler, minifier, transpiler, or proprietary build tool is required.<\/li>\n<li>Rebuilding the distributed assets only requires copying source files unchanged: <code>cp assets\/src\/admin.js assets\/admin.js<\/code> and <code>cp assets\/src\/admin.css assets\/admin.css<\/code>.<\/li>\n<\/ul>\n\n<p>All maintainable source required to inspect and reproduce the distributed assets is included in this plugin package.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin from the WordPress.org Plugin Directory, or upload the plugin ZIP through <strong>Plugins &gt; Add New &gt; Upload Plugin<\/strong>.<\/li>\n<li>Activate <strong>Sajib Media Cleanup &amp; Storage Manager<\/strong>.<\/li>\n<li>Open <strong>Media &gt; Media Cleanup Manager<\/strong>.<\/li>\n<li>Keep the recommended reference checks enabled.<\/li>\n<li>Run a media scan.<\/li>\n<li>Review the results before preparing an exact cleanup plan.<\/li>\n<li>Keep a current site backup before permanent cleanup operations.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20sajib%20media%20cleanup%20%26%20storage%20manager%20delete%20unattached%20images%20automatically%3F\"><h3>Does Sajib Media Cleanup &amp; Storage Manager delete unattached images automatically?<\/h3><\/dt>\n<dd><p>No. Unattached does not mean unused. The plugin uses reference indexing, an exact cleanup plan and a final live verification layer.<\/p><\/dd>\n<dt id=\"does%20it%20protect%20common%20builder%20and%20woocommerce%20media%20references%3F\"><h3>Does it protect common builder and WooCommerce media references?<\/h3><\/dt>\n<dd><p>The scanner indexes WordPress content and metadata used by common builder and commerce workflows, including Elementor and WooCommerce references. ACF-related metadata is also included in the plugin's reference-indexing workflow.<\/p><\/dd>\n<dt id=\"what%20is%20the%20safety%20vault%20delayed-purge%20hold%3F\"><h3>What is the Safety Vault delayed-purge hold?<\/h3><\/dt>\n<dd><p>Safety Vault is a delayed-purge hold. Verified candidates remain at their original upload paths while deletion is pending, so cancelling the hold requires no file restoration. Permanent purge runs only after another live reference and path-safety check.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20send%20site%20data%20to%20an%20external%20service%3F\"><h3>Does the plugin send site data to an external service?<\/h3><\/dt>\n<dd><p>No telemetry or remote scanning service is required by the plugin. Media analysis runs inside the WordPress installation.<\/p><\/dd>\n<dt id=\"can%20i%20permanently%20delete%20files%3F\"><h3>Can I permanently delete files?<\/h3><\/dt>\n<dd><p>Yes. Permanent cleanup is available only after the verification workflow and confirmation. Keep a recent backup before destructive operations.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.7.1<\/h4>\n\n<ul>\n<li>Added plugin-row links for View details, Getting Started and Documentation.<\/li>\n<li>Improved WordPress.org listing terminology for media-cleaner discovery.<\/li>\n<li>Added screenshot captions for the directory listing.<\/li>\n<li>Refined public readme and release metadata.<\/li>\n<\/ul>\n\n<h4>1.7.0<\/h4>\n\n<ul>\n<li>Reworked SQL templates, identifier placeholders, filter binding and fingerprint commit ordering for safer scan execution.<\/li>\n<li>Added fail-closed database checks and complete attachment metadata validation.<\/li>\n<li>Hardened permission checks, stale-derivative validation and UTC job timestamps.<\/li>\n<li>Added context-aware media ID extraction and isolated WordPress\/MySQL tests.<\/li>\n<li>Added WordPress\/MySQL, browser, concurrency, compatibility and package-acceptance coverage.<\/li>\n<\/ul>\n\n<h4>1.6.4<\/h4>\n\n<ul>\n<li>Excluded legacy HMG media-cleaner tables from custom reference discovery.<\/li>\n<li>Prevents historical scanner\/index data from falsely marking attachments as live website usage.<\/li>\n<li>Improves cleanup accuracy on sites upgraded from earlier Media Guard\/Harrington Media Guardian builds.<\/li>\n<\/ul>\n\n<h4>1.6.3<\/h4>\n\n<ul>\n<li>Rechecked the complete WordPress.org review package and hardened self-reference isolation.<\/li>\n<li>Excluded all plugin-owned operational tables from custom website-reference discovery.<\/li>\n<li>Skip filesystem symlinks during orphan discovery before they can become candidates.<\/li>\n<li>Replaced remaining dynamic identifier SQL with WordPress identifier placeholders where applicable.<\/li>\n<li>Restored the Media Family explorer button.<\/li>\n<li>Reformatted distributed CSS and JavaScript for clearly human-readable source review.<\/li>\n<\/ul>\n\n<h4>1.6.2<\/h4>\n\n<ul>\n<li>Fixed delayed-purge integrity checks so an attachment's own inventory metadata is not mistaken for frontend usage.<\/li>\n<li>Tightened safe handling of missing orphan paths during purge.<\/li>\n<li>Removed PHP error-suppression operators from filesystem reads and image inspection.<\/li>\n<li>Improved AJAX checkbox normalization and admin output escaping.<\/li>\n<li>Kept all WordPress.org review fixes from 1.6.1.<\/li>\n<\/ul>\n\n<h4>1.6.1<\/h4>\n\n<ul>\n<li>Renamed to place the unique Sajib identifier first and prepared the requested <code>sajib-media-cleanup-manager<\/code> slug.<\/li>\n<li>Hardened all attachment-derived filesystem paths with uploads-directory containment and safe filename handling.<\/li>\n<li>Replaced metadata-derived wildcard sibling matching with containment-checked directory enumeration.<\/li>\n<li>Replaced direct file deletion calls with WordPress core file deletion after path validation.<\/li>\n<li>Added consistent unslashing and sanitization for AJAX input.<\/li>\n<li>Clarified Safety Vault as a delayed-purge hold rather than a physical file move.<\/li>\n<li>Added explicit human-readable source and no-build documentation for directory review.<\/li>\n<\/ul>\n\n<h4>1.6.0<\/h4>\n\n<ul>\n<li>Renamed with a distinctive sajibsays identifier and new public slug.<\/li>\n<li>Replaced the previous short internal prefix with the unique <code>sajmc_<\/code> \/ <code>SAJMC_<\/code> prefix.<\/li>\n<li>Added strict uploads-directory containment checks for every attachment-derived filesystem path.<\/li>\n<li>Reworked Safety Vault as delayed purge so it does not copy files into web-accessible storage.<\/li>\n<li>Added human-readable JavaScript\/CSS source copies and documented the no-build asset workflow.<\/li>\n<li>Retained background-worker timeout recovery and bounded metadata scanning.<\/li>\n<\/ul>\n\n<h4>1.5.2<\/h4>\n\n<ul>\n<li>Added automatic stale-worker recovery after Action Scheduler\/host timeouts.<\/li>\n<li>Reduced builder-reference batch size and added a six-second soft execution budget.<\/li>\n<li>Large Elementor\/metadata payloads are scanned in bounded chunks.<\/li>\n<li>Fingerprint writes are split into smaller transactions to reduce lock\/timeout risk.<\/li>\n<li>Existing valid scan progress can resume safely after updating.<\/li>\n<\/ul>\n\n<h4>1.5.1<\/h4>\n\n<ul>\n<li>Improved stale-derivative reference accuracy.<\/li>\n<li>Separated self attachment metadata from authoritative frontend references.<\/li>\n<li>Kept current page, template, option and active-code protections before derivative cleanup.<\/li>\n<li>Prepared the plugin for WordPress.org distribution under GPL v2 or later.<\/li>\n<\/ul>\n\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Added Safety Vault quarantine and restore workflow.<\/li>\n<li>Added post-cleanup integrity checks.<\/li>\n<li>Added Media Family inspection.<\/li>\n<li>Added incremental scan delta reporting.<\/li>\n<li>Added stale derivative audit and cleanup workflow.<\/li>\n<\/ul>","raw_excerpt":"WordPress media cleaner for auditing unused media, duplicate images, orphan files and stale thumbnails with layered verification and delayed-purge pro \u2026","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/370771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=370771"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sajibsays"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=370771"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=370771"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=370771"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=370771"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=370771"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=370771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}