First, I would like to say that getting the Pro version will not make everything better. If the free has an issue, the Pro will not fix it. It wouldn’t be fair for me to do that to my users. The Pro version adds interesting options, but it doesn’t mean it works better.
1. It suddenly… stops, or freezes!
This is a common issue, and don’t look for common issues, each install is different and so is the origin of the issue. But basically, it’s either because the request wasn’t finished within the time allowed by the server, or because an error happened (by any plugin).
- Check your PHP Error Logs. If you don’t know how, click here: Where are the PHP Error Logs. If there is an error, happening during the Media Cleaner process, the scan will stop.
- Slow down the analysis. Try lower values in the Media Cleaner settings (except for the Delay which could/should be higher). Try again.
- Disable all the plugins except Media Cleaner, and try again. Does it work better?
- Run the scan with the Console Developer Tools (Google Chrome) opened, especially the network tab. When an error happens, the call appears red. Click on it, look a the Response. Anything odd? More information about the Network tab here: Network Analysis Reference.
I am keeping this updated, unfortunately, if you don’t find the issue with this, it might be impossible to find.
2. It detects too many entries as being not-used
Make sure your options are set right. Have a look at your PHP Error Logs. Is there any error? Is it related to the plugin?
Then you might be using a page builder or a specific plugin dealing with images that it is not supported by Media Cleaner (WPML Media for example). Are you using one? Check the Compatibility part of the description of the plugin here. If it’s not on the list, please comment below, as other users might also join the discussion and ask for this feature.
There is the last check you can do by yourself. Enable the Logs option in the plugin settings. Run the scan. At the end, a file will be created with debugging information about the latest scan. Under the Logs option, a link to the log file will be added when this file exists. You can open it, and have a look. In the first section of it, you will find the different media IDs and URLs referenced and grouped. In the second section (Checking Media…), the result of the analysis on each media. This second section looks like this:
Basically, the ID or the URL of each media are being matched against the first section.
If nothing helps, and you still think that there is something wrong with Media Cleaner, first, you need to find an example how a file that is used (but detected as not used), and find exactly where and how it is used. For example: The Media 25 (titled “Holidays in Nagasaki”) is used as a background image in my article about Nagasaki, using a page builder called “Beaver Builder”. Those details are important. I will not be able to help you if I don’t know this.
Once you have those details, contact me and share them with me. I will be likely to ask you to replicate the issue on a fresh new install of WordPress (I can give you one), that will make me able to fix it more quickly.
3. It detects nothing as being not used
It means your images might have been used somewhere you didn’t suspect. Look at all your images and find one that you are sure is not used anywhere on your website. Click on it in the Media Library. On the right, there is a little widget called Media Cleaner.
It will indicate to your something like: Seems to be used in a gallery, or Seems to be used in a post (and in that case, you will get a link to that post). Does this help you?
4. It is using too much memory
The latest versions of the plugin are much much, much faster and don’t timeout anymore, even on big installs. That is because most of the work is done during the posts’s analysis, and results stored in the cache. There are no redundant checks. This cache is stored in the database, as transients (WordPress feature). There is a reason: if anything wrong happens, of if the plugin is uninstalled, one week later those transients will be automatically cleared by WordPress. That way, everything is always clean.
Now, why is it using too much memory? That’s because the plugin needs to load the cached data, and update it with more data. This could be implemented a bit differently (by creating another table in the database only for this cache) but right now this problem is encountered by less than 1% of the users, and the implementation of this would affect too many of my users, without counting that I prefer to focus on making the plugin detection/analysis perfect before working on this issue.
Solutions would be to: disable all the plugins and re-run the scan (other plugins take also a lot of memory), increase the memory limit, or avoid to check all the options for the Media Cleaner (you probably don’t need all of them depending on what you are checking).