• On our site we have something like 20 bespoke plugins. Sometimes these do very little and offer just a few functions with a particular task and maybe just a few hundred lines of code. Other times they do a lot with 5000+ lines. In addition, each plugin has its own CSS file and sometimes JS too.

    At the same time, should we keep ALL plugin functions on a single php file or split them over several files and include them when needed?

    For the sake of speed, is it worth combing plugins into 1 giant plugin (or maybe 2 or 3) and have all the CSS into a single CSS file?

    Or better to keep them separate?

    Just wondering…

    • This topic was modified 3 years, 10 months ago by arathra.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Keep theme separate. Each plugin should do its own thing. It’s better for maintenance and future sanity. CSS can be optimized later using plugins like Autoptimize. At best, you’d save milliseconds by combining them.

    Thread Starter arathra

    (@arathra)

    Thanks – I can see combining the CSS files won’t make a huge difference in loading time.

    But what do you reckon about the plugin functions themselves? Combine plugins where we can or keep them very granular as we have them now?

    In terms of actually coding them it seems like whenever we need a new bit of functionality on the site we have a new plugin for it – will it make any difference to speed if we start bringing them in together?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    There would be no significant difference in speed. Granularity is good in that it makes for things that are maintainable. This is really about your workflow, now and in the future. You could build a Jetpack-like behemoth or a bunch of unix-like atoms.

    Thread Starter arathra

    (@arathra)

    Thanks for your input here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘speed: single vs multiple plugins’ is closed to new replies.