Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#39151 closed feature request (invalid)

Plugin Namespacing for Tags

Reported by: lewiscowles's profile LewisCowles Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Plugins Keywords:
Focuses: administration, performance Cc:

Description

It would be really nice to be able to retrieve plugins via tags or namespaces (ideally both). Essentially every plugin would have tags and a namespace like

E-commerce
===========

  • WooCommerce
  • WooCommerce product tabs pro
  • WooCommerce coupons

Users
===========

  • Members Pro

etc. Plugins without could be put in misc or other (some appropriate catch-all)

I believe this would benefit the admin experience for site admins of complex sites, but more-so; could feed into other areas like wp-ajax callbacks and rest-api endpoints to speed up loading of the site by enabling endpoints to only load specific tags or namespaces of plugins needed. This would also have benefits if some plugins interact in a way that is undesirable for the API without custom coding, debugging etc.

It would absolutely require more discipline than is currently needed for using the API, so would probably only benefit a few customers initially. Longer-term as sites using WP become more successful and seek to differentiate themselves, this would be really important for a site with say 100 plugins and 1,000,000 users who may not use all plugins for a REST API endpoint to function correctly to not load those plugins and therefore serve faster responses.

I'd be happy to spend some time if this is something warranting consideration; it'd definitely need help, but would help with performance at scale even with feature-filled websites.

Change History (3)

#1 @rmccue
7 years ago

  • Focuses rest-api removed

Is this functionality in WordPress itself, or as a WordPress.org API for the plugin repository? W.org already has this API.

I'm not sure I see the benefits to it for local usage, but this data does already exist in the readme.txt files if you want to pull it out. Can you describe the use case for this a little further?

I'm also not sure how this would change any performance characteristics. Right now, all plugins are loaded, which allows plugins to control what they want to do. If you know in your plugin that you don't need to load on a REST API request, you can already skip loading anything. However, due to the interconnectedness of WordPress, it's unlikely your plugin won't need to do anything. Conditionally loading plugins is generally a bad idea, and IMO it's the plugin's responsibility to handle this.

#2 @LewisCowles
7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

It was a suggestion for REST-API and plugin management via admin.

Simple logic (to me) was that although execution is deferred, many plugins do a non-trivial amounts of processing on early hooks and even upon __construct. Mitigating that would add speed to a site, and lower resource consumption as it seems quite high.

This could benefit users across the board including the smallest shared hosting users right up to sites with a lot of spot traffic, or high overall traffic because there would simply be more resources to go around by lowering how much of the resources are needed per-request.

I have since looked at the source code. I now feel this may not be possible or practical the way this issue originally outlines.

I Still feel conditionally loading plugins is a great idea if deliberate; but the framework for doing so probably cannot be a core concern, simply because of the startup process (looks like plugins come in-use very early and are included in wp-settings.php).

Closing.

#3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.