| 开发者 |
oliverodev
alexis-olivero |
|---|---|
| 更新时间 | 2026年6月14日 10:17 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/oliverodev-media-audit/.Yes. The plugin reads content to determine whether a file is in use; it never deletes anything automatically. You review the results first and choose which files to remove one at a time.
The free version searches all post content, including raw Elementor and Divi data stored in post meta. The PRO version adds dedicated deep-detection integrations for these builders to catch edge cases in their proprietary storage formats.
The free version scans post meta values and will find most ACF image references stored as attachment IDs or URLs. The PRO version includes a dedicated ACF integration for complete coverage of repeaters and flexible content fields.
Install the plugin, go to Tools → OliveroDev Media Audit, click Start New Scan, and open the Unused Files tab when the scan finishes. Every file listed there was not found in any post, page, or site setting.
It depends on your library size. The scan runs in batches (configurable from 1 to 200 files per batch) directly in your browser via AJAX, so it won't time out even on large libraries with thousands of files.
The plugin calls WordPress's native wp_delete_attachment() function, which removes the attachment post, all registered image sizes, and the original file from your server. This is the same process WordPress uses in the media library.
No. Deletion is permanent. If you need a safety net before bulk cleanup, the PRO version includes an intelligent Trash System that lets you move files to a staging area before committing to deletion.
The free version scans product descriptions, product gallery meta, and variation image meta. The PRO version adds dedicated WooCommerce detection to cover featured product images and gallery references more reliably.
Only if those files were indexed by search engines and linked from external sites. For files that are truly unused (not referenced in any post or page on your site), there is no SEO impact. If you are unsure, review each file individually before deleting.
Go to Tools → OliveroDev Media Audit.
The plugin is designed for single-site installations. Multisite compatibility is on the roadmap.
Yes. Go to Tools → OliveroDev Media Audit → Settings and choose a scan frequency: hourly, twice daily, daily, or weekly. The scan runs in the background via WP-Cron.
Images: JPEG, PNG, GIF, WebP, SVG. The PRO version extends this to PDF, DOC, DOCX, XLS, XLSX, MP4, MP3, ZIP, RAR, and more.
Do not delete it. The free version covers the most common storage locations. If you are using a plugin or theme with a custom database structure, the file may be referenced in a table the free version does not scan. The PRO version covers the most popular third-party tools. You can also filter the detection using the oliverodev_media_audit_is_media_used WordPress filter hook.
includes() is not a valid PHP function. Replaced with the correct ABSPATH . wp-admin/includes/ path with file_exists() guard, matching the pattern used in the Scanner class._elementor_data rows for atomic $$type format IDs, including rows without upload URLs that step 7's URL filter previously skipped.$$type object (image, background, grid, etc.) with a numeric "value", not only "image-attachment-id". Previously missed backgrounds on Grid → Spacer and similar nested element structures."id". Background images stored under "background_image", "image", or any other key using $$type objects are now detected._elementor_data and _elementor_css postmeta for both classic and atomic ID patterns + URL, fixing the "No specific location found" message for Elementor content.$$type descriptors). Elementor 4.x stores "id": {"$$type":"image-attachment-id","value":N} instead of the classic "id":N, and the previous regex missed it entirely. Background images on Containers/Sections now show as "used" on Elementor 4.x sites.save_post, so newly generated CSS files are picked up on the next scan instead of being missed due to stale cache.realpath() resolution to prevent symlink-based path traversal in file deletion routines.wp_get_attachment_image() output to prevent stored XSS via image alt text.FILTER_UNSAFE_RAW with direct sanitize_key() calls for all input variables.index.php to logs directory for directory listing hardening._product_image_gallery) now correctly detected as in-use — previously showed as unused on WooCommerce sites.data-imghtml + .html() in delete modal with data-imgurl + document.createElement('img') — removes potential XSS vector in file preview.render_media_row() no longer calls the full scanner on every page render — reads cached postmeta instead, reducing page load from 1000+ queries to ~20.scan_batch() signature.*.css files in uploads/elementor/css/ without a stale post-ID filter, using a 1-minute file-list transient and 2-minute per-file object cache.oliverodev_media_audit_get_filesystem() called includes() which is not a valid PHP or WordPress function. Replaced with a direct filesize() call; WP_Filesystem is unnecessary for reading file sizes.check_css_background_usage() searches for url() patterns in post_content and postmeta.$terms variable — changed to $search_terms.wp-image-{id} CSS class and "id":N JSON block patterns — matching all detection methods used by the scanner.i:N;, ,N,, ,N") being matched in postmeta, usermeta, termmeta, and options tables._edit_last, counters) happened to store the same number as a media ID."id":N, data-id="N", etc.) are now scoped exclusively to post_content where Gutenberg blocks live, eliminating false positives in meta tables.