Plugin Logic: A simple, but forgotten performance plugin
Recently I made a video post on Plugin Load Filter and in it I mentioned Plugin Logic. It was suggested to me, but I did not try it as it appeared to have been abandoned for years.
Strangely, after my video I discovered that neither Plugin Load Filter or Plugin Organizer were of use for a particular site of mine.
I gave it a spin and really, really liked it. My hope with this is it will inspire an update or encourage someone to take it and reboot it.
Before I run away with myself…
Plugin Logic (like Plugin Load Filter and Plugin Organizer ) is a free plugin that allows us to stop unneeded plugins from loading on specific pages and posts in our WordPress installs. What make it different is it’s simplicity. Early 5 star reviewers seem to have come from the more complex Plugin Organizer for this reason.
Isn’t this a bit risky?
I simply don’t know. The plugin only has two files and one of those is for the interface. I did take a quick look at the code before using to see if it cleared itself from the database on deletion and it did. I tested with PHP 7.4 RC.
Sadly, I don’t know enough to talk about security. It does not strike me as a high risk plugin and no issues have been logged on vulnerability databases. But then it has few active installs. All I can say is the code look well commented and the first line in the code is a security check… but what do I know!
How to set it up
The official instructions are a series of screenshots so it took some experimenting to work it out.
1. Search by the author simon_h as the WordPress repository seems to hide older plugins.
2. Install, activate and go to Plugins > Plugin Logic.
3. If you plan to stop plugins on admin pages go to Screen Options and tick on “Behavoir on Dashboard”.
4. URLs can be active or inactive. If “active” only the URL added will load the plugin. If “inactive” the plugin will load on all pages except the URLS added.
5. Words (within URLs) can be used. Anything without http:// or http:// will be treats as a word (eg. mysite.com/blog/)
6. Use the trailing “/” for homepages (domain root).
7. To stop loading to admin page untick “Always on”. You need to assign to a word or URL for this to work.
8. To stop a plugin from loading at the front end you can assign it to be active on a URL or Word that does not exist.
Notes
- You can use /wp-admin/ as a word for assigning to admin page, but remember some plugins need to use cron.php
- In the example above I have the UsageDD plugin inactive on admin pages and active on front-end pages. When looking at installed plugins it appears to be deactivated but is not.
- You can deactivate the plugin and it will remember setting but will not if deleted.
- I encountered one bug while attempting to break things. The rules all move one table up. So far I have found no issues with the regular added and removing of plugins in the install.
The site used in the demo was an Astra Site by the Brainstorm Force team.