• Hi Team,

    We are testing the Optimization Detective plugin on our development and staging sites, but since those environments do not receive any real user traffic, we wanted to clarify:

    1. Is there any way to simulate or generate metrics in a staging/development environment so that we can validate how the plugin and its dependent plugins (e.g., Image Prioritizer, Embed Optimizer) work?
    2. Or is the plugin designed to function only on production sites with real visitor traffic, meaning it won’t provide any usable data on staging environments?

    This will help us plan whether we should include it in our staging setup or keep it limited to production only.

    Thanks in advance for your guidance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Thanks for the question. At the moment, it relies on real visitor traffic (although these real visitors could be administrators logged-in to WordPress).

    We are currently working on a major feature which would allow for simulated visitors to crawl the site to generate the URL Metrics. See https://github.com/WordPress/performance/issues/1311 and https://github.com/WordPress/performance/pull/1850. This feature is probably not going to be released in the short future, since I’m intending it to be released after 1.0 (and we’re currently in beta for 1.0).

    However, if your staging site is not accessible to the public, another option would be for you to opt-in to allowing unlimited collection of URL Metrics. You can do so via the Dev Mode plugin which disables the storage lock and the freshness TTL. This is referenced in the docs.

    With that plugin active on your staging environment, you could set up some Puppeteer script to just visit various URLs on your site while emulating desktop and mobile devices. This would have the effect of priming the URL Metrics data, which is essentially what we’re working to facilitate with the plugin.

    Thread Starter gokilamanickam

    (@gokilamanickam)

    Thank you for sharing this information.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using Optimization Detective on staging & development’ is closed to new replies.