web-stories-wp icon indicating copy to clipboard operation
web-stories-wp copied to clipboard

Implement end-to-end (e2e) performance testing

Open swissspidy opened this issue 10 months ago • 0 comments

Task Description

I wrote a tutorial on end‑to‑end performance testing in WordPress and built https://github.com/swissspidy/wp-performance-testing in the process. The Web Stories plugin could benefit from such performance tests.

There are some frontend performance opportunities worth having tests for so we can measure the impact:

  • Web Stories block
    • Improve JavaScript loading using defer/async
      • #13515
    • Use more lightweight JavaScript
      • #13502
    • lazy loading / fetchpriority of story poster images
    • Ensure there are no layout shifts if used in the header or so
  • Single stories
    • Potentially add fetchpriority on the preload for the main story image (already preloaded)
      • See https://web.dev/articles/fetch-priority
  • Database queries
    • Ensure less stuff is loaded on the frontend
    • #13523
  • Speculative resource loading (speculation rules)
    • #13603

Not focusing on the backend right now.

The tests setup would require some simple utilities to create dummy content (stories, blocks, etc.)

swissspidy avatar Apr 16 '24 13:04 swissspidy