WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.

Home Page:https://wordpress.org/plugins/performance-lab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability to prime URL metrics across a site upon installation of Optimization Detective

westonruter opened this issue · comments

Feature Description

When activating Optimization Detective, it starts gathering URL metrics from visitors to the site. However, it has a storage locking mechanism to prevent a user (by hashed IP address) from submitting URL metrics once every 60 seconds. Additionally, URL metrics are not collected for administrator users since pages often include additional elements for admins which will make the URL metrics not applicable to non-admins. All this means that if a site does not get much traffic it can take a few days (or longer) to gather enough URL metrics to apply the optimizations. We could speed up this process by providing a way for an administrator to initiate a site-wide collection of URL metrics. A new query parameter could be introduced which (1) loads the page as a non-admin and (2) disables any storage locking for URL metrics. Then given a list of URLs on the site (e.g. from the sitemaps), each one could be loaded up in an iframe for each breakpoint. A progress bar could also be shown. The process could be interrupted at any time, and if the user wants to start again they could either initiate collection only for URLs for which there are no URL metrics gathered or else to start again from scratch.

This would be cool to implement as a CLI tool as well, using Puppeteer.