WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
https://wordpress.org/plugins/performance-lab/
GNU General Public License v2.0
353 stars 95 forks source link

Plugin Proposal: Performance Dashboard #1324

Open swissspidy opened 2 months ago

swissspidy commented 2 months ago

Overview

About the plugin

Purpose

Leverage Optimization Detective to collect Core Web Vitals field data inside WordPress. Enables site owners to see what real users are experiencing on their site, without CrUX.

Optimization Detective is uniquely positioned to also collect web vitals RUM data. This data can then be presented in the WordPress dashboard for site owners to keep an eye on their site's performance.

For context, this is based on a proof of concept I did in #1098, which already has a bit of a discussion there.

Note: I don't know how useful the idea is, but I wanted to create an actual issue for the POC so that it doesn't get lost.

Related:

I found an existing Core Web Vitals Monitor WordPress plugin which also does this but is somehow not maintained nor popular. We might be able to learn something from it.

See also:

Scope

Screenshots from the POC:

Dedicated dashboard page:

Screenshot 2024-03-28 at 17 28 25

Admin dashboard widget:

Screenshot 2024-04-10 at 10 16 17

Potential

In the future we could:

Rationale

Other

joemcgill commented 2 months ago

I 💖 this idea.

However, rather than making this a separate plugin, I really think we should consider adding this type of data to Performance Lab and integrate OD when available (or bundle the API into that plugin too).

Now that all of our Performance features are unbundled into standalone plugins, I think there's an opportunity for PL to add more value as a tool for collecting and surfacing performance metrics and opportunities for improvement to site owners. A dashboard like this seems to fit that purpose nicely.

adamsilverstein commented 1 month ago

Also related: https://github.com/adamsilverstein/web-vitals-block

swissspidy commented 1 month ago

Re-sharing https://github.com/WordPress/performance/pull/1098#issuecomment-2271624343 by @felixarntz here.

The suggestion is also to keep this in the main plugin. By default it would only collect Server-Timing, but when OD is active it could hook into the reporting process and collect web vitals information too. And maybe other 3rd party plugins could do the same. That opens more questions about how such a standalone collection mechanism would look like. Definitely would want to avoid reinventing the wheel there, so maybe we could indeed just bundle the OD API into the plugin (which would be kinda ironic).

In any case, this is still in early stages and nothing is set in stone yet. For rapid iteration on the POC, it's easiest to continue working with the existing structure and then re-evaluate once it becomes more concrete.