Project

General

Profile

Actions

Feature #2125

closed

Create a plugin stats generator

Added by Dominic Giglio over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority name:
Low
Assignee:
Dominic Giglio
Category name:
WordPress (misc)
Target version:
Start date:
2012-09-13
Due date:
% Done:

100%

Estimated time:
Deployment actions:

Description

The Commons needs a plugin stats generator to determine which plugins are being used versus those that are not.

Being able to see, at a glance, which plugins we've installed on The Commons and which specific sites have enabled those plugins will allow us to determine the usefulness of certain plugins over others, and determine which plugins we need to keep and which we can remove.

I plan on working from the existing plugin stats generator: http://wordpress.org/extend/plugins/multisite-plugin-stats/


Related issues

Related to CUNY Academic Commons - Bug #2104: WordPress Database Backup Plugin ErrorResolvedDominic Giglio2012-09-06

Actions
Related to CUNY Academic Commons - Feature #2156: Evaluate unused plugins and themes for removalResolvedDominic Giglio2012-09-29

Actions
Actions #1

Updated by Matt Gold over 11 years ago

Thanks for your work on this, Dom.

Actions #2

Updated by Dominic Giglio over 11 years ago

Boone,

Back in Issue #2104 we discussed both Network Plugin Auditor and Multisite Plugin Stats. You expressed your concern about Multisite Plugin Stats using switch_to_blog() and ultimately timing out on a site as large as ours. While this is true for this particular plugin I believe we dismissed Network Plugin Auditor too soon.

I started writing up a little plugin to try to accomplish this without using switch_to_blog() and I actually got pretty far. I had a new settings page added to the Network Plugins menu but I needed to see how the two plugins above went about organizing themselves to get a jump on how I was going to do it differently. Since I had already looked at Multisite Plugin Stats, I decided instead to look at Network Plugin Auditor. It turns out that this plugin does not use switch_to_blog(). It's actually quite a small, clean plugin that uses native functions to gather plugin/theme information from across a multisite install and then attaches itself to a few actions and filters that are involved in building the native Network Sites, Network Plugins and Network Themes admin pages. I installed it and ran it locally and didn't see too much of a performance hit. Obviously, the plugins admin page does load slower due to the extra info it's looking through but there were no timeouts or crashes.

I'd like to add Network Plugin Auditor to either the 1.4.x branch or a topic branch and deploy it to cdev so we can see how it works closer to production. If it holds up I really think it'll simplify both identifying unused plugins as well as unused themes, allowing us to really clean up the internals if the site. Also, we don't have to have the plugin activated all the time. We just turn it on when we need to know the specific usage for a certain plugin or theme and then turn it back off.

Let me know what you think, I guess a topic branch would probably be cleaner, as opposed to trying to fold it directly into 1.4.x before we verify it's working on cdev.

Actions #3

Updated by Boone Gorges over 11 years ago

Hi Dom,

Yeah, please go ahead and put it on a topic branch for testing on cdev. Sounds great.

As for activating/deactiviting - shouldn't be necessary, as the plugin ought to be written in such a way that it only runs its queries when the super admin is looking at the dashboard panel in question.

Actions #4

Updated by Dominic Giglio over 11 years ago

Created topic branch: plugin-stats off of 1.4.x

Let me know if you want me to test on cdev now, or if you'd like to test it first.

Actions #5

Updated by Boone Gorges over 11 years ago

Dom, please go ahead and test on cdev. Just make sure that it doesn't bring the house a-tumblin' down :)

Actions #6

Updated by Dominic Giglio over 11 years ago

Network Plugin Auditor (the plugin-stats topic branch) has been checked-out and network activated on cdev for testing.

Here's my initial report:

1.) The Network Plugins page takes roughly 20 seconds to load (mainly because it doesn't use pagination), and displays a new column listing the blogs that have activated each plugin

2.) The Network Themes page loads very quickly and displays a new column listing the blogs that are currently running each theme as the active theme.

3.) The Network Sites page also loads very quickly and displays a new column listing the active plugins for each blog.

Take a look and let me know what you think. If you're OK with the features we could roll this into 1.4.6 and start a new issue (or continue an existing issue) to start cleaning up unused plugins and themes across the Commons install. If this sounds like a good plan let me know and I'll create a list of unused themes and plugins and then start an issue listing them all so we can discuss which can go and which should stay.

Actions #7

Updated by Boone Gorges over 11 years ago

If this sounds like a good plan let me know

Thumbs up. The 20 second lag on Network Plugins is annoying, but we can always disable the plugin if this gets to be a problem (as you noted earlier).

Thanks for your work on this!

Actions #8

Updated by Matt Gold over 11 years ago

should we loop André into this conversation if site load may be an issue, at the least to give him a heads-up and to ask him to keep an eye out?

Actions #9

Updated by Boone Gorges over 11 years ago

We're only talking about the speed of loading the Network Admin plugins page, which is only done once every few weeks (at most), and only by the admin. The only danger is that that one pageload will time out. This is not a broader load issue, and probably isn't worth André's attention.

Actions #10

Updated by Matt Gold over 11 years ago

Got it. thanks for the explanation.

Actions #11

Updated by Dominic Giglio over 11 years ago

I added André as a watcher just in case.

Boone,

Should I change this to 1.4.6, 1.4.7, or 1.4.8? Should I just merge into 1.4.x and close this issue?

And as far as making lists of unused themes and plugins, should I wait until it gets to the live production site so we can make sure it works as we're expecting before moving forward? I think it would be best to look through unused themes and plugins on production because local dev and cdev installs don't accurately reflect exact theme/plugin usage.

Actions #12

Updated by Boone Gorges over 11 years ago

  • Target version changed from Future release to 1.4.6

Should I just merge into 1.4.x and close this issue?

That's fine. No need to hold off until a later release if the work is already done.

should I wait until it gets to the live production site so we can make sure it works as we're expecting before moving forward?

Yes, for the reasons you state. cdev is years out of date.

Dom, please open a separate ticket for the discussion of out-of-date plugins, so that we can mark this one as Resolved as part of the 1.4.6 release. That new ticket can be an Enhancement, with a milestone of Not Tracked (since it may end up spanning a few releases).

Actions #13

Updated by Dominic Giglio over 11 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

I've merged the plugin-stats topic into 1.4.x and pushed to the repo.

https://github.com/castiron/cac/commit/d430ba37e10c04b2a3ab42f5be1c7eaab236eae1

I've removed the plugin-stats topic branch from the repo and am closing this issue. I will open a new issue per your suggestion for tracking the removal of unused plugins and themes (I'll reference this issue on that new one).

Actions

Also available in: Atom PDF