WordPress Ideas » Topic: Selective Plugin loadinghttps://wordpress.org/ideas/topic/selective-plugin-loading
WordPress Ideas » Topic: Selective Plugin loadingen-USSat, 10 Dec 2016 01:14:13 +0000http://bbpress.org/?v=1.1cartpauj on "Selective Plugin loading"https://wordpress.org/ideas/topic/selective-plugin-loading/page/3#post-26721
Mon, 09 Jun 2014 03:00:28 +0000cartpauj26721@https://wordpress.org/ideas/I can see both sides of the argument here, but after reading this thread -- I have to say I fully agree with Justin Tadlock. It should be up to plugin authors to utilize the WP hooks appropriately.

If the plugin author writes a crappy plugin, you shouldn't be using it regardless of whether you can control what page(s) it loads on or not. If their implementation is crappy, their code is probably crappy, and if their code is crappy, there's a good chance it poses a security vulnerability as well.

Besides, a lot of plugins have API endpoints that are used and never documented, and good luck getting support from many of these plugin authors to even know what these endpoints are so you can ensure the plugin is loaded when those endpoints are hit from an external application. For example, think of any eCommerce plugin that receives an IPN notification from PayPal, or a Webhook from Stripe, or a Silent Post from Authorize.net.

I think a feature like this doesn't make sense at the WP core level, and would cause far more headaches than it would solve -- not to mention needless bloat to an already large (and ever growing) code-base.

There are a few plugins that do this, and that is the great thing about WordPress; that it is extensible enough for a 3rd party developer to do something like this. Besides, a plugin that can do this is, in my opinion, more than sufficient for those folks who are truly concerned about performance.

]]>garnser on "Selective Plugin loading"https://wordpress.org/ideas/topic/selective-plugin-loading/page/2#post-24759
Tue, 07 May 2013 20:23:55 +0000garnser24759@https://wordpress.org/ideas/A colleague of mine and I have developed a plugin (oh the irony) to deal with this: feel free to give it a spin.

]]>enailor on "Selective Plugin loading"https://wordpress.org/ideas/topic/selective-plugin-loading/page/2#post-18549
Thu, 23 Dec 2010 15:27:25 +0000enailor18549@https://wordpress.org/ideas/@zafrir_ron
Thank you for posting your code. I do hope you submit this to the Trac for consideration as @Greenshady suggested.

This does appear to be rather cumbersome for general use, so I do hope someone can take this and turn it into either a solid plugin or find a way to add this into the core (this would be beyond my capabilities at this point). It would be very helpful.

@ucfknight10
I commend your approach to writing effective plugins, but I have to disagree in a couple places with you.

First off, constantly bugging plugin developers may not be the best option. Most of them offer their plugins for free, so bugging someone over something that you did not pay for and not offering to pay their for their time to fix what you consider to be a problem is a bit much. If the plugin developer wants to continue the plugin development, its fine to request a feature or programming change, but we must always keep in mind that they are doing so in their free time.

Also, there are a number of plugins that are just the best at what they do, but at the same time can bloat your website with code not needed on each page load. Having a way to curb that would be a great option. And I do believe that there are enough bright minds in this community that can make this work without it breaking all the time.

Now, I do agree with you on being selective about the plugins you use. I prefer to not use plugins unless I have to. If I can add the same functionality to my theme's function.php file, then I have more control over things. And I don't have to worry about a developer abandoning a plugin down the road. Of course, this means you have to understand the functionality of a plugin to begin with, and some are way to in depth or big to simply add to your function.php file. So there are still times we need to use the plugins.

@all
I do hope that this idea gets substantial consideration. I also hope that plugin developers will see this as a request to try and write smart code that only adds to the page load when needed.

If you check the most popular plugins on the net including the >1000,000 installations you will learn that this is not an issue only of plugin design.
I'm not in the business of education of plugin authors, so I'm only looking for the best ways to implement what I need.
Many plugins only written for single page and admin, no use to even read it from the disk.

If you read my explanation, you will find that its possible to selectively load plugin without crashing the site...I also can inform you that I'm working like this for 6 month with over 60 plugins now...

The idea behind this is to give site and WP owners the control over selective loading of plugins. If you look for education of plugin developers it should be to think and mark where your plugin should be loaded, instead of all plugins code always loads for every page load.

]]>ucfknight10 on "Selective Plugin loading"https://wordpress.org/ideas/topic/selective-plugin-loading/page/2#post-18515
Sat, 18 Dec 2010 14:16:12 +0000ucfknight1018515@https://wordpress.org/ideas/if a plugin is slowing your site down, dont use it. find another one. by doing this you will force the plugin author to update their script to be more efficient and load only when it is needed. as a plugin developer also, i take great care to make my plugins as efficient as possible, and to load only when needed.

and the clients i develop sites for, if selectively loading plugins per post/page was possible, i know they would crash the site constantly, and come crying to me for help, or blame me for the problem. i think that bugging the plugin author is the best way to affect the changes you are wanting.

it'd be too late in the process to load the plugin. Thus, breaking the functionality of the plugin.

Well...this is VERY early in the process, the plugin file is not even accessed or loads!

The decision here is if to look for the plugin file based on the URI!

As said its not a plugin coding its a core coding, that's why it should go into WP core.

I invite anyone to write the simple admin control page:
since WP core is loaded, its reading the active plugin list by get_option( 'active_plugins' ), write a form page with plugin list and "include/exclude" radio select and single line for comma separated reg-exp of urls, write the result back as option (see data structure).

I guess when I will find few hours to spare I'll code it and update here.