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”.

Plugin-Logic-SS1

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.

Plugin-Logic-SS-2

 

 

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.

AstraAd

Posted in
DWcircle

I build websites at WP Corner Shop and travel. I also co-host a weekly WordPress podcast called WP Builds and make YouTube videos.

7 Comments

  1. Al Al on 23rd November 2019 at 2:33 am

    Hey David. I seen your youtube video and comment on the plugin page. I was one of the 100+ people that used plugin logic. I was hoping that the developer would have replied to your comment. It would be nice if someone could have picked up the project since it is so easy to use. It’s so easy to use. I’ve been meaning to use plugin organizer but haven’t tested it on my staging site yet. I don’t need all those other options that come with plugin organizer. Plugin Logic is so lightweight and I don’t know if Plugin Organizer would affect speed in any way but I shall soon find out.

    Do you use plugin organizer?

    Thanks.

  2. Steve teare Steve teare on 16th December 2019 at 2:43 am

    David-

    Plugin Logic is our go-to plugin for selective plugin activation. We use it on all our speed sites. It is simple and it is the fastest loading.
    We’ve written more about this topic here:

    REFERENCE: http://pagepipe.com/selective-plugin-deactivation/

    One reason it is so lost is its product name is unsearchable and unfindable in the plugin directory. And sometimes even Google can’t find it. We attempted buying it from the plugin author. But said he wasn’t interested in selling it. :( But it is open-source code. We can rename it and republish it. We’re hanging on to a copy in case that is ever necessary. Meanwhile, it’s our secret speed weapon.

    Thanks for trying to reboot this plugin.

    -Steve, performance engineer at PagePipe

  3. Steve Teare Steve Teare on 16th December 2019 at 2:46 am

    PS- You just got a backlink from us. :)

  4. Steve Teare Steve Teare on 16th December 2019 at 3:09 am

    Me again. You mention doing selective deactivation on WooCommerce plugin. We want to know your secret. When we do this, all Woo pages get white screened with this plugin. What’s your trick?

    “WooCommerce plugin cannot be selectively deactivated. That will white-screen the
    site. Selective deactivation of plugins is a beautiful speed strategy, but we can’t use it
    with this plugin. Sadness.

    Nor can any associated Woo add-on plugin be selectively deactivated. It will break all
    e-commerce pages. For example, these plugins will break the shopping cart if any is
    deactivated anywhere.” – PagePipe

    Thanks for letting us know the solution.

    • David Waumsley David Waumsley on 16th December 2019 at 7:39 am

      Brilliant Steve, thanks so much for these comments. I feel less alone!

      Yeah, I have not had an issue with WooCommerce. It worked on the test site (last screenshot above).

      But I also set up on a client site and my own business site too. See here: https://share.getcloudapp.com/z8unxZj6

      Maybe something else you use is having an impact?

      Yes, I used Plugin Organizer first. Probably when it was quite new for a number of years. Mainly I used on another eCommerce business site we ran. It was great. It got down my hosting costs, but heck it is ugly and confusing. I don’t have it on any current sites now.

  5. adonai adonai on 14th June 2020 at 5:01 pm

    ME too! It is a wonderful plugin. TOP TOP simply and very effective!

  6. Davide Davide on 6th July 2023 at 10:01 am

    Thank you for the explanations! Good job!

Leave a Comment