Optimization Detective changelog

By WordPress Performance Team, on WordPress.org since 2024. 60,000+ active installs.

Browse code

19 tagged releases, newest first. Dates are when each release was tagged in SVN. Notes come from the plugin's readme, which may not list every release.

  1. 1.0.0-beta7
    • Add declare( strict_types = 1 ) to all PHP files. (2424)
    • Bump minimum required WordPress version to 6.9. (2517)
    • Bump minimum required PHP version from 7.2 to 7.4. (2469)
    • Improve code quality with native property types and stricter static analysis. (1729)
    • Bump the bundled web-vitals library from 5.1.0 to 6.1.0, including its 6.0.0 major release. (2606, 2629)
    • Ship the source maps for the bundled web-vitals library, which it began publishing in 6.0.0.

    And 2 more notes.

    Source Diff vs 1.0.0-beta6
  2. 1.0.0-beta6
    • Add validation of the SCRIPT element containing the detection args JSON. This fixes a DOM clobbering vulnerability in which an injected element with a colliding id could shadow the script and cause an arbitrary module to be imported, which required an authenticated user with at least a contributor role. Props to Asaf Mozes (amosec) for responsible disclosure.
    Source Diff vs 1.0.0-beta5
  3. 1.0.0-beta5
    • Prevent fatal error in od_get_current_url_metrics_etag() when $wp_query->posts is null. (2347)
    • Add support for dns-prefetch links. (2256)
    Source Diff vs 1.0.0-beta4
  4. 1.0.0-beta4
    • Add URL Metric mutation helpers to extension initialization API. (1951)
    • Add gzip compression for URL metrics using Compression Streams API. (1959)
    • Allow disabling timestamp-based freshness checks by using negative TTL values. (1940)
    • Bump web-vitals from 5.0.3 to 5.1.0. (2116)
    • Change default garbage collection TTL of od_url_metrics posts from 1 month to 3 months and add the filter to customize expiration. (1950)
    • Enhance Optimization Detective meta generator tag with all disabled reasons. (1979)

    And 8 more notes.

    Source Diff vs 1.0.0-beta3
  5. 1.0.0-beta3
    • Fire actions before and after Optimization Detective processes a document. (1919)
    • Update OD_HTML_Tag_Processor::next_tag() to allow $query arg and prepare to skip visiting tag closers by default. (1872)
    • Expose the logging functions to client-side extensions and automatically account for the value of isDebug. (1895)
    • Update URL Metric storage REST API endpoint to return status code 423 Locked instead of 403 Forbidden. (1863)
    • De-duplicate logic between REST API and URL Metrics post type. (1867)
    • Fix URL encoding in Link HTTP response header. (1907)

    And 3 more notes.

    Source Diff vs 1.0.0-beta2
  6. 1.0.0-beta2
    • Account for 64 KiB limit for sending beacon data. (1851)
    • Add post ID for the od_url_metrics post to the tag visitor context. (1847)
    • Change minimum viewport width to be exclusive whereas the maximum width remains inclusive. (1839)
    • Disable URL Metric storage locking by default for administrators. (1835)
    • Include active plugins in ETag data and increase default freshness TTL from 1 day to 1 week. (1854)
    • Make ETag a required property of the URL Metric. (1824)

    And 5 more notes.

    Source Diff vs 1.0.0-beta1
  7. 1.0.0-beta1
    • Add site health check to detect blocked REST API and short-circuit optimization when unavailable. (1762)
    • Allow extensions to opt in to using the web-vitals attribution build via the od_use_web_vitals_attribution_build filter. (1759)
    • Disambiguate XPaths for children of BODY with id, class, or role attributes. (1797)
    • Eliminate varying URL Metrics by logged-in state and discontinue disabling optimization by default for admins. (1788)
    • Improve test coverage for Optimization Detective. (1817)
    • Introduce OD_Tag_Visitor_Context::track_tag() method as alternative for returning true in tag visitor callback. (1821)

    And 5 more notes.

    Source Diff vs 0.9.0
  8. 0.9.0
    • Add fetchpriority=high to IMG when it is the LCP element on desktop and mobile with other viewport groups empty. (1723)
    • Improve debugging stored URL Metrics in Optimization Detective. (1656)
    • Incorporate page state into ETag computation. (1722)
    • Mark existing URL Metrics as stale when a new tag visitor is registered. (1705)
    • Set development mode to ‘plugin’ in the dev environment and allow pages to be optimized when admin is logged-in (when in plugin dev mode). (1700)
    • Add get_xpath_elements_map() helper methods to OD_URL_Metric_Group_Collection and OD_URL_Metric_Group, and add get_all_element_max_intersection_ratios/get_element_max_intersection_ratio methods to OD_URL_Metric_Group. (1654)

    And 5 more notes.

    Source Diff vs 0.8.0
  9. 0.8.0
    • Serve unminified scripts when SCRIPT_DEBUG is enabled. (1643)
    • Bump web-vitals from 4.2.3 to 4.2.4. (1628)
    • Eliminate the detection time window which prevented URL Metrics from being gathered when page caching is present. (1640)
    • Revise the use of nonces in requests to store a URL Metric and block cross-origin requests. (1637)
    • Send post ID of queried object or first post in loop in URL Metric storage request to schedule page cache validation. (1641)
    • Fix phpstan errors. (1627)
    Source Diff vs 0.7.0
  10. 0.7.0
    • Send gathered URL Metric data when the page is hidden/unloaded as opposed to once the page has loaded; this enables the ability to track layout shifts and INP scores over the life of the page. (1373)
    • Introduce client-side extensions in the form of script modules which are loaded when the detection logic runs. (1373)
    • Add an od_init action for extensions to load their code. (1373)
    • Introduce OD_Element class and improve PHP API. (1585)
    • Add group collection helper methods to get the first/last groups. (1602)
    • Fix Optimization Detective compatibility with WooCommerce when Coming Soon page is served. (1565)

    And 1 more note.

    Source Diff vs 0.6.0
  11. 0.6.0
    • Allow URL Metric schema to be extended. (1492)
    • Clarify docs around a tag visitor’s boolean return value. (1479)
    • Include UUID with each URL Metric. (1489)
    • Introduce get_cursor_move_count() to use instead of get_seek_count() and get_next_token_count(). (1478)
    • Add missing global documentation for delete_all_posts(). (1522)
    • Introduce viewport aspect ratio validation for URL Metrics. (1494)
    Source Diff vs 0.5.0
  12. 0.5.0
    • Bump web-vitals from 4.2.1 to 4.2.2. (1386)
    • Disable Optimization Detective by default on the embed template. (1472)
    • Ensure only HTML documents are processed by Optimization Detective. (1442)
    • Ensure the entire template is passed to the output buffer callback for Optimization Detective to process. (1317)
    • Implement full support for intersectionRect/boundingClientRect, fix viewportRect typing, and harden JSON schema. (1411)
    Source Diff vs 0.4.1
  13. 0.4.1
    • Upgrade web-vitals.js from v3.5.0 to v4.2.1.
    • Fix logic for seeking during optimization loop to prevent emitting seek() notices. (1376)
    Source Diff vs 0.4.0
  14. 0.4.0
    • Avoid passing positional parameters in Optimization Detective. (1338)
    • Send preload links via HTTP Link headers in addition to LINK tags. (1323)
    Source Diff vs 0.3.1
  15. 0.3.1
    • Log URL Metrics group collection to console when debugging is enabled (WP_DEBUG is true). (1295)
    • Include non-intersecting elements in URL Metrics to fix lazy-load optimization. (1293)
    Source Diff vs 0.3.0
  16. 0.3.0
    • The image optimization features have been split out into a new dependent plugin called Image Prioritizer, which also now optimizes image lazy-loading. (1088)
    Source Diff vs 0.2.0
  17. 0.2.0
    • Add optimization_detective_disabled query var to disable behavior. (1193)
    • Facilitate embedding Optimization Detective in other plugins/themes. (1185)
    • Use PHP 7.2 features in Optimization Detective. (1162)
    • Improve overall code quality with stricter static analysis checks. (775)
    • Bump minimum PHP requirement to 7.2. (1130)
    • Avoid _doing_it_wrong() for Server-Timing in Optimization Detective when output buffering is not enabled. (1194)

    And 2 more notes.

    Source Diff vs 0.1.1
  18. 0.1.1
    • Use plugin slug for generator tag. (1103)
    • Prevent detection script injection from breaking import maps in classic themes. (1084)
    Source Diff vs 0.1.0
  19. 0.1.0
    • Initial release.
    Source