From 5f02d0410968836156d30cd567e036a80d517d8f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 25 Jan 2025 14:12:31 -0800 Subject: [PATCH 1/5] Bump plugin versions --- plugins/embed-optimizer/load.php | 4 ++-- plugins/embed-optimizer/readme.txt | 4 +++- plugins/image-prioritizer/load.php | 4 ++-- plugins/image-prioritizer/readme.txt | 4 +++- plugins/optimization-detective/load.php | 4 ++-- plugins/optimization-detective/readme.txt | 4 +++- plugins/performance-lab/load.php | 4 ++-- plugins/performance-lab/readme.txt | 4 +++- plugins/speculation-rules/load.php | 4 ++-- plugins/speculation-rules/readme.txt | 4 +++- plugins/webp-uploads/load.php | 4 ++-- plugins/webp-uploads/readme.txt | 4 +++- 12 files changed, 30 insertions(+), 18 deletions(-) diff --git a/plugins/embed-optimizer/load.php b/plugins/embed-optimizer/load.php index ca88113804..e4c8623785 100644 --- a/plugins/embed-optimizer/load.php +++ b/plugins/embed-optimizer/load.php @@ -5,7 +5,7 @@ * Description: Optimizes the performance of embeds through lazy-loading, preconnecting, and reserving space to reduce layout shifts. * Requires at least: 6.6 * Requires PHP: 7.2 - * Version: 0.4.0 + * Version: 0.4.1 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -71,7 +71,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi } )( 'embed_optimizer_pending_plugin', - '0.4.0', + '0.4.1', static function ( string $version ): void { if ( defined( 'EMBED_OPTIMIZER_VERSION' ) ) { return; diff --git a/plugins/embed-optimizer/readme.txt b/plugins/embed-optimizer/readme.txt index 9aed8dcd77..05ef33c22a 100644 --- a/plugins/embed-optimizer/readme.txt +++ b/plugins/embed-optimizer/readme.txt @@ -2,7 +2,7 @@ Contributors: wordpressdotorg Tested up to: 6.7 -Stable tag: 0.4.0 +Stable tag: 0.4.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, embeds @@ -67,6 +67,8 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu == Changelog == += 0.4.1 = + = 0.4.0 = **Enhancements** diff --git a/plugins/image-prioritizer/load.php b/plugins/image-prioritizer/load.php index e74554a54f..dc7b84006f 100644 --- a/plugins/image-prioritizer/load.php +++ b/plugins/image-prioritizer/load.php @@ -6,7 +6,7 @@ * Requires at least: 6.6 * Requires PHP: 7.2 * Requires Plugins: optimization-detective - * Version: 0.3.0 + * Version: 0.3.1 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -72,7 +72,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi } )( 'image_prioritizer_pending_plugin', - '0.3.0', + '0.3.1', static function ( string $version ): void { if ( defined( 'IMAGE_PRIORITIZER_VERSION' ) ) { return; diff --git a/plugins/image-prioritizer/readme.txt b/plugins/image-prioritizer/readme.txt index 47a47bd270..0df486f4db 100644 --- a/plugins/image-prioritizer/readme.txt +++ b/plugins/image-prioritizer/readme.txt @@ -2,7 +2,7 @@ Contributors: wordpressdotorg Tested up to: 6.7 -Stable tag: 0.3.0 +Stable tag: 0.3.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, optimization, image, lcp, lazy-load @@ -70,6 +70,8 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu == Changelog == += 0.3.1 = + = 0.3.0 = **Enhancements** diff --git a/plugins/optimization-detective/load.php b/plugins/optimization-detective/load.php index b3db789330..801c8fdee5 100644 --- a/plugins/optimization-detective/load.php +++ b/plugins/optimization-detective/load.php @@ -5,7 +5,7 @@ * Description: Provides an API for leveraging real user metrics to detect optimizations to apply on the frontend to improve page performance. * Requires at least: 6.6 * Requires PHP: 7.2 - * Version: 0.9.0 + * Version: 1.0.0-beta1 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -71,7 +71,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi } )( 'optimization_detective_pending_plugin', - '0.9.0', + '1.0.0-beta1', static function ( string $version ): void { if ( defined( 'OPTIMIZATION_DETECTIVE_VERSION' ) ) { return; diff --git a/plugins/optimization-detective/readme.txt b/plugins/optimization-detective/readme.txt index da95e83923..41e04e87b0 100644 --- a/plugins/optimization-detective/readme.txt +++ b/plugins/optimization-detective/readme.txt @@ -2,7 +2,7 @@ Contributors: wordpressdotorg Tested up to: 6.7 -Stable tag: 0.9.0 +Stable tag: 1.0.0-beta1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, optimization, rum @@ -55,6 +55,8 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu == Changelog == += 1.0.0-beta1 = + = 0.9.0 = **Enhancements** diff --git a/plugins/performance-lab/load.php b/plugins/performance-lab/load.php index 9fb0acbba9..81c2a72fe0 100644 --- a/plugins/performance-lab/load.php +++ b/plugins/performance-lab/load.php @@ -5,7 +5,7 @@ * Description: Performance plugin from the WordPress Performance Team, which is a collection of standalone performance features. * Requires at least: 6.6 * Requires PHP: 7.2 - * Version: 3.7.0 + * Version: 3.8.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -21,7 +21,7 @@ } // @codeCoverageIgnoreEnd -define( 'PERFLAB_VERSION', '3.7.0' ); +define( 'PERFLAB_VERSION', '3.8.0' ); define( 'PERFLAB_MAIN_FILE', __FILE__ ); define( 'PERFLAB_PLUGIN_DIR_PATH', plugin_dir_path( PERFLAB_MAIN_FILE ) ); define( 'PERFLAB_SCREEN', 'performance-lab' ); diff --git a/plugins/performance-lab/readme.txt b/plugins/performance-lab/readme.txt index 98276fc6e6..d75fdd088a 100644 --- a/plugins/performance-lab/readme.txt +++ b/plugins/performance-lab/readme.txt @@ -2,7 +2,7 @@ Contributors: wordpressdotorg Tested up to: 6.7 -Stable tag: 3.7.0 +Stable tag: 3.8.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, site health, measurement, optimization, diagnostics @@ -71,6 +71,8 @@ Contributions are always welcome! Learn more about how to get involved in the [C == Changelog == += 3.8.0 = + = 3.7.0 = **Enhancements** diff --git a/plugins/speculation-rules/load.php b/plugins/speculation-rules/load.php index 7db7134846..2d04073930 100644 --- a/plugins/speculation-rules/load.php +++ b/plugins/speculation-rules/load.php @@ -5,7 +5,7 @@ * Description: Enables browsers to speculatively prerender or prefetch pages to achieve near-instant loads based on user interaction. * Requires at least: 6.6 * Requires PHP: 7.2 - * Version: 1.3.1 + * Version: 1.4.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -66,7 +66,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi } )( 'plsr_pending_plugin_info', - '1.3.1', + '1.4.0', static function ( string $version ): void { // Define the constant. diff --git a/plugins/speculation-rules/readme.txt b/plugins/speculation-rules/readme.txt index 0e665fbfe4..2792b5265d 100644 --- a/plugins/speculation-rules/readme.txt +++ b/plugins/speculation-rules/readme.txt @@ -2,7 +2,7 @@ Contributors: wordpressdotorg Tested up to: 6.7 -Stable tag: 1.3.1 +Stable tag: 1.4.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, javascript, speculation rules, prerender, prefetch @@ -119,6 +119,8 @@ Contributions are always welcome! Learn more about how to get involved in the [C == Changelog == += 1.4.0 = + = 1.3.1 = **Bug Fixes** diff --git a/plugins/webp-uploads/load.php b/plugins/webp-uploads/load.php index 33959947de..2115b665fa 100644 --- a/plugins/webp-uploads/load.php +++ b/plugins/webp-uploads/load.php @@ -5,7 +5,7 @@ * Description: Converts images to more modern formats such as WebP or AVIF during upload. * Requires at least: 6.6 * Requires PHP: 7.2 - * Version: 2.4.0 + * Version: 2.5.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -26,7 +26,7 @@ return; } -define( 'WEBP_UPLOADS_VERSION', '2.4.0' ); +define( 'WEBP_UPLOADS_VERSION', '2.5.0' ); define( 'WEBP_UPLOADS_MAIN_FILE', plugin_basename( __FILE__ ) ); require_once __DIR__ . '/helper.php'; diff --git a/plugins/webp-uploads/readme.txt b/plugins/webp-uploads/readme.txt index 559b3c23a7..a53ffca20e 100644 --- a/plugins/webp-uploads/readme.txt +++ b/plugins/webp-uploads/readme.txt @@ -2,7 +2,7 @@ Contributors: wordpressdotorg Tested up to: 6.7 -Stable tag: 2.4.0 +Stable tag: 2.5.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, images, webp, avif, modern image formats @@ -60,6 +60,8 @@ By default, the Modern Image Formats plugin will only generate WebP versions of == Changelog == += 2.5.0 = + = 2.4.0 = **Enhancements** From dce9ad987749b3b936f8dfdd193a4268418ea777 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 25 Jan 2025 14:15:53 -0800 Subject: [PATCH 2/5] Run npm run since --- .../class-embed-optimizer-tag-visitor.php | 6 +++--- .../class-od-element.php | 4 ++-- .../class-od-html-tag-processor.php | 10 +++++----- .../class-od-tag-visitor-context.php | 4 ++-- .../class-od-visited-tag-state.php | 12 ++++++------ plugins/optimization-detective/detection.php | 2 +- .../optimization-detective/optimization.php | 2 +- plugins/optimization-detective/site-health.php | 18 +++++++++--------- .../bfcache-compatibility-headers/helper.php | 4 ++-- .../bfcache-compatibility-headers/hooks.php | 4 ++-- .../effective-asset-cache-headers/helper.php | 16 ++++++++-------- .../effective-asset-cache-headers/hooks.php | 4 ++-- plugins/speculation-rules/hooks.php | 2 +- plugins/speculation-rules/settings.php | 2 +- plugins/webp-uploads/hooks.php | 2 +- 15 files changed, 46 insertions(+), 46 deletions(-) diff --git a/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php b/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php index a5eba66bd4..5f657cd9fd 100644 --- a/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php +++ b/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php @@ -210,7 +210,7 @@ private function reduce_layout_shifts( OD_Tag_Visitor_Context $context ): void { * not end up being the load balanced domain used for the embed. Lastly, these domains are only for the URLs * for GET requests, as POST requests are not likely to be part of the critical rendering path. * - * @since n.e.x.t + * @since 0.4.1 * * @param OD_HTML_Tag_Processor $processor Processor, with the cursor currently at an embed block. * @return array Array of URLs to preconnect to. @@ -270,7 +270,7 @@ private function get_preconnect_urls( OD_HTML_Tag_Processor $processor ): array /** * Adds preconnect links for embed resources. * - * @since n.e.x.t + * @since 0.4.1 * * @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block. */ @@ -299,7 +299,7 @@ private function add_preconnect_links( OD_Tag_Visitor_Context $context ): void { /** * Optimizes an embed based on whether it is displayed in any initial viewport. * - * @since n.e.x.t + * @since 0.4.1 * * @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block. */ diff --git a/plugins/optimization-detective/class-od-element.php b/plugins/optimization-detective/class-od-element.php index e2415e5129..e918d7c29a 100644 --- a/plugins/optimization-detective/class-od-element.php +++ b/plugins/optimization-detective/class-od-element.php @@ -36,7 +36,7 @@ class OD_Element implements ArrayAccess, JsonSerializable { /** * Transitional XPath. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @todo Remove logic related to transitional_xpath in a subsequent release once URL Metrics have been collected with the new format. * @var non-empty-string|null */ @@ -131,7 +131,7 @@ public function is_lcp_candidate(): bool { * Gets XPath for element. * * @since 0.7.0 - * @since n.e.x.t Returns the transitional XPath format. To access the underlying raw XPath, access the 'xpath' key of the jsonSerialize response. + * @since 1.0.0-beta1 Returns the transitional XPath format. To access the underlying raw XPath, access the 'xpath' key of the jsonSerialize response. * @todo Remove logic related to transitional_xpath in a subsequent release once URL Metrics have been collected with the new format. * * @return non-empty-string XPath. diff --git a/plugins/optimization-detective/class-od-html-tag-processor.php b/plugins/optimization-detective/class-od-html-tag-processor.php index cac52d7820..e995a4a1e5 100644 --- a/plugins/optimization-detective/class-od-html-tag-processor.php +++ b/plugins/optimization-detective/class-od-html-tag-processor.php @@ -159,7 +159,7 @@ final class OD_HTML_Tag_Processor extends WP_HTML_Tag_Processor { * Note that currently only the third item will currently be populated (index 2), as this corresponds to tags which * are children of the `BODY` tag. This is used in {@see self::get_xpath()}. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @var array> */ private $open_stack_attributes = array(); @@ -204,7 +204,7 @@ final class OD_HTML_Tag_Processor extends WP_HTML_Tag_Processor { * This is used to store the old XPath format in a transitional period until which new URL Metrics are expected to * have been collected to purge out references to the old format. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @var string|null */ private $current_xpath = null; @@ -582,7 +582,7 @@ private function get_indexed_breadcrumbs(): Generator { * Themes utilize the 'wp-site-blocks' class name in the root `DIV`. Only one attribute is currently returned, * although potentially more could be returned if additional disambiguation is needed in the future. * - * @since n.e.x.t + * @since 1.0.0-beta1 * * @return array Disambiguating attributes. */ @@ -682,7 +682,7 @@ public function get_xpath(): string { * can simply be an alias for that one. See related logic in {@see OD_Element::get_xpath()}. This function is only * used internally by Optimization Detective in {@see od_optimize_template_output_buffer()}. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @todo Move the logic in this method to the get_xpath() method and let this be an alias for that method once the transitional period is over. * @access private * @@ -715,7 +715,7 @@ public function get_stored_xpath(): string { /** * Returns whether the processor is currently at or inside the admin bar. * - * @since n.e.x.t + * @since 1.0.0-beta1 * * @return bool Whether at or inside the admin bar. */ diff --git a/plugins/optimization-detective/class-od-tag-visitor-context.php b/plugins/optimization-detective/class-od-tag-visitor-context.php index 7a85a9f12d..1398030b8c 100644 --- a/plugins/optimization-detective/class-od-tag-visitor-context.php +++ b/plugins/optimization-detective/class-od-tag-visitor-context.php @@ -51,7 +51,7 @@ final class OD_Tag_Visitor_Context { /** * Visited tag state. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @var OD_Visited_Tag_State */ private $visited_tag_state; @@ -78,7 +78,7 @@ public function __construct( OD_HTML_Tag_Processor $processor, OD_URL_Metric_Gro * * Calling this method from a tag visitor has the same effect as a tag visitor returning `true`. * - * @since n.e.x.t + * @since 1.0.0-beta1 */ public function track_tag(): void { $this->visited_tag_state->track_tag(); diff --git a/plugins/optimization-detective/class-od-visited-tag-state.php b/plugins/optimization-detective/class-od-visited-tag-state.php index d0ed12013d..d7cedc4053 100644 --- a/plugins/optimization-detective/class-od-visited-tag-state.php +++ b/plugins/optimization-detective/class-od-visited-tag-state.php @@ -3,7 +3,7 @@ * Optimization Detective: OD_Visited_Tag_State class * * @package optimization-detective - * @since n.e.x.t + * @since 1.0.0-beta1 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * State for a tag visitation when visited by tag visitors while walking over a document. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private */ final class OD_Visited_Tag_State { @@ -23,7 +23,7 @@ final class OD_Visited_Tag_State { /** * Whether the tag should be tracked among the elements in URL Metrics. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @var bool */ private $should_track_tag; @@ -38,7 +38,7 @@ public function __construct() { /** * Marks the tag for being tracked in URL Metrics. * - * @since n.e.x.t + * @since 1.0.0-beta1 */ public function track_tag(): void { $this->should_track_tag = true; @@ -47,7 +47,7 @@ public function track_tag(): void { /** * Whether the tag should be tracked among the elements in URL Metrics. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @return bool Whether tracked. */ public function is_tag_tracked(): bool { @@ -59,7 +59,7 @@ public function is_tag_tracked(): bool { * * This should be called after tag visitors have been invoked on a tag. * - * @since n.e.x.t + * @since 1.0.0-beta1 */ public function reset(): void { $this->should_track_tag = false; diff --git a/plugins/optimization-detective/detection.php b/plugins/optimization-detective/detection.php index e7992ffe03..ac49a97624 100644 --- a/plugins/optimization-detective/detection.php +++ b/plugins/optimization-detective/detection.php @@ -87,7 +87,7 @@ function od_get_detection_script( string $slug, OD_URL_Metric_Group_Collection $ * Note that the attribution build is slightly larger than the standard build, so this is why it is not used by default. * The additional attribution data is made available to client-side extension script modules registered via the `od_extension_module_urls` filter. * - * @since n.e.x.t + * @since 1.0.0-beta1 * * @param bool $use_attribution_build Whether to use the attribution build. */ diff --git a/plugins/optimization-detective/optimization.php b/plugins/optimization-detective/optimization.php index 7dbd531549..0f6b7fbdb3 100644 --- a/plugins/optimization-detective/optimization.php +++ b/plugins/optimization-detective/optimization.php @@ -130,7 +130,7 @@ function_exists( 'perflab_server_timing_use_output_buffer' ) * * This is only used when WP_DEBUG is enabled. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @param string[] $reasons Reason messages. diff --git a/plugins/optimization-detective/site-health.php b/plugins/optimization-detective/site-health.php index dadfe34378..968dc565ea 100644 --- a/plugins/optimization-detective/site-health.php +++ b/plugins/optimization-detective/site-health.php @@ -3,7 +3,7 @@ * Site Health checks. * * @package optimization-detective - * @since n.e.x.t + * @since 1.0.0-beta1 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * Adds the Optimization Detective REST API check to site health tests. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @param array{direct: array}|mixed $tests Site Health Tests. @@ -39,7 +39,7 @@ function od_add_rest_api_availability_test( $tests ): array { /** * Tests availability of the Optimization Detective REST API endpoint. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @return array{label: string, status: string, badge: array{label: string, color: string}, description: string, actions: string, test: string} Result. @@ -68,7 +68,7 @@ function od_test_rest_api_availability(): array { * the admin. The reason for storing the negative unavailable state as opposed to the positive available state is that * when an option does not exist then `get_option()` returns `false` which is the same falsy value as the stored `'0'`. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @return bool Whether unavailable. @@ -80,7 +80,7 @@ function od_is_rest_api_unavailable(): bool { /** * Tests availability of the Optimization Detective REST API endpoint. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @param array|WP_Error $response REST API response. @@ -165,7 +165,7 @@ function od_compose_site_health_result( $response ): array { /** * Gets the response to an Optimization Detective REST API store request to confirm it is available to unauthenticated requests. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @param bool $use_cached Whether to use a previous response cached in a transient. @@ -195,7 +195,7 @@ function od_get_rest_api_health_check_response( bool $use_cached ) { /** * Renders an admin notice if the REST API health check fails. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @param bool $in_plugin_row Whether the notice is to be printed in the plugin row. @@ -251,7 +251,7 @@ function od_maybe_render_rest_api_health_check_admin_notice( bool $in_plugin_row /** * Displays an admin notice on the plugin row if the REST API health check fails. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private * * @param string $plugin_file Plugin file. @@ -273,7 +273,7 @@ function od_render_rest_api_health_check_admin_notice_in_plugin_row( string $plu * shown at the `admin_notices` action once, the notice will only be displayed inline with the plugin row thereafter * via {@see od_render_rest_api_health_check_admin_notice_in_plugin_row()}. * - * @since n.e.x.t + * @since 1.0.0-beta1 * @access private */ function od_maybe_run_rest_api_health_check(): void { diff --git a/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/helper.php b/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/helper.php index cda7bbf672..62eb86408c 100644 --- a/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/helper.php +++ b/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/helper.php @@ -3,7 +3,7 @@ * Helper functions used for Cache-Control headers for bfcache compatibility site health check. * * @package performance-lab - * @since n.e.x.t + * @since 3.8.0 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * Tests the Cache-Control headers for bfcache compatibility. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @return array{label: string, status: string, badge: array{label: string, color: string}, description: string, actions: string, test: string} Result. diff --git a/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/hooks.php b/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/hooks.php index 66c5eaba81..32171d600a 100644 --- a/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/hooks.php +++ b/plugins/performance-lab/includes/site-health/bfcache-compatibility-headers/hooks.php @@ -3,7 +3,7 @@ * Hook callbacks used for cache-control headers. * * @package performance-lab - * @since n.e.x.t + * @since 3.8.0 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * Add the bfcache compatibility check to site health tests. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @param array{direct: array} $tests Site Health Tests. diff --git a/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/helper.php b/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/helper.php index a0dc8c2787..ce0b8c1431 100644 --- a/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/helper.php +++ b/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/helper.php @@ -3,7 +3,7 @@ * Helper function to detect if static assets have effective caching headers. * * @package performance-lab - * @since n.e.x.t + * @since 3.8.0 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * Callback for the effective caching headers test. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @return array{label: string, status: string, badge: array{label: string, color: string}, description: string, actions: string, test: string} Result. @@ -50,7 +50,7 @@ function perflab_effective_asset_cache_headers_assets_test(): array { /** * Filters the list of assets to check for effective caching headers. * - * @since n.e.x.t + * @since 3.8.0 * * @param string[] $assets List of asset URLs to check. */ @@ -84,7 +84,7 @@ function perflab_effective_asset_cache_headers_assets_test(): array { /** * Checks if effective caching headers are enabled for a list of assets. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @param string[] $assets List of asset URLs to check. @@ -163,7 +163,7 @@ function perflab_effective_asset_cache_headers_check_assets( array $assets ): ar /** * Checks if effective caching headers are enabled. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @param WpOrg\Requests\Utility\CaseInsensitiveDictionary|array> $headers Response headers. @@ -173,7 +173,7 @@ function perflab_effective_asset_cache_headers_check_headers( $headers ): array /** * Filters the threshold for effective caching headers. * - * @since n.e.x.t + * @since 3.8.0 * * @param int $threshold Threshold in seconds. */ @@ -266,7 +266,7 @@ function perflab_effective_asset_cache_headers_check_headers( $headers ): array /** * Attempt a conditional request with ETag/Last-Modified. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @param string $url The asset URL. @@ -304,7 +304,7 @@ function perflab_effective_asset_cache_headers_try_conditional_request( string $ /** * Generate a table listing files that need effective caching headers, including reasons. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @param array $fail_details Array of arrays with 'filename' and 'reason'. diff --git a/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/hooks.php b/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/hooks.php index 8faab27f2c..4f80434c59 100644 --- a/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/hooks.php +++ b/plugins/performance-lab/includes/site-health/effective-asset-cache-headers/hooks.php @@ -3,7 +3,7 @@ * Hook callbacks used for effective caching headers. * * @package performance-lab - * @since n.e.x.t + * @since 3.8.0 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * Adds tests to site health. * - * @since n.e.x.t + * @since 3.8.0 * @access private * * @param array{direct: array} $tests Site Health Tests. diff --git a/plugins/speculation-rules/hooks.php b/plugins/speculation-rules/hooks.php index 5ad4646f17..743deb7923 100644 --- a/plugins/speculation-rules/hooks.php +++ b/plugins/speculation-rules/hooks.php @@ -37,7 +37,7 @@ function plsr_print_speculation_rules(): void { * For site owners of sites without pretty permalinks that are certain their site is not using such a pattern, * this filter can be used to still enable speculative loading at their own risk. * - * @since n.e.x.t + * @since 1.4.0 * * @param bool $enabled Whether speculative loading is enabled even without pretty permalinks. */ diff --git a/plugins/speculation-rules/settings.php b/plugins/speculation-rules/settings.php index 18ed4624ab..54b16e0698 100644 --- a/plugins/speculation-rules/settings.php +++ b/plugins/speculation-rules/settings.php @@ -63,7 +63,7 @@ function plsr_get_setting_default(): array { /** * Returns the stored setting value for Speculative Loading configuration. * - * @since n.e.x.t + * @since 1.4.0 * * @return array{ mode: 'prefetch'|'prerender', eagerness: 'conservative'|'moderate'|'eager' } { * Stored setting value. diff --git a/plugins/webp-uploads/hooks.php b/plugins/webp-uploads/hooks.php index 3df9bbbf0b..08feff9e04 100644 --- a/plugins/webp-uploads/hooks.php +++ b/plugins/webp-uploads/hooks.php @@ -514,7 +514,7 @@ function webp_uploads_remove_sources_files( int $attachment_id ): void { /** * Filters `wp_content_img_tag` to update images so that they use the preferred MIME type where possible. * - * @since n.e.x.t + * @since 2.5.0 * * @param string $filtered_image Full img tag with attributes that will replace the source img tag. * @param string $context Additional context, like the current filter name or the function name from where this was called. From 10dd59aac6496d1b3cc70d916d29943371645a98 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 25 Jan 2025 14:18:54 -0800 Subject: [PATCH 3/5] Remove -beta1 from 1.0.0 since tags --- .../class-od-element.php | 4 ++-- .../class-od-html-tag-processor.php | 10 +++++----- .../class-od-tag-visitor-context.php | 4 ++-- .../class-od-visited-tag-state.php | 12 ++++++------ plugins/optimization-detective/detection.php | 2 +- .../optimization-detective/optimization.php | 2 +- plugins/optimization-detective/site-health.php | 18 +++++++++--------- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/plugins/optimization-detective/class-od-element.php b/plugins/optimization-detective/class-od-element.php index e918d7c29a..f462b7d08e 100644 --- a/plugins/optimization-detective/class-od-element.php +++ b/plugins/optimization-detective/class-od-element.php @@ -36,7 +36,7 @@ class OD_Element implements ArrayAccess, JsonSerializable { /** * Transitional XPath. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @todo Remove logic related to transitional_xpath in a subsequent release once URL Metrics have been collected with the new format. * @var non-empty-string|null */ @@ -131,7 +131,7 @@ public function is_lcp_candidate(): bool { * Gets XPath for element. * * @since 0.7.0 - * @since 1.0.0-beta1 Returns the transitional XPath format. To access the underlying raw XPath, access the 'xpath' key of the jsonSerialize response. + * @since 1.0.0 Returns the transitional XPath format. To access the underlying raw XPath, access the 'xpath' key of the jsonSerialize response. * @todo Remove logic related to transitional_xpath in a subsequent release once URL Metrics have been collected with the new format. * * @return non-empty-string XPath. diff --git a/plugins/optimization-detective/class-od-html-tag-processor.php b/plugins/optimization-detective/class-od-html-tag-processor.php index e995a4a1e5..6a8dcb41a9 100644 --- a/plugins/optimization-detective/class-od-html-tag-processor.php +++ b/plugins/optimization-detective/class-od-html-tag-processor.php @@ -159,7 +159,7 @@ final class OD_HTML_Tag_Processor extends WP_HTML_Tag_Processor { * Note that currently only the third item will currently be populated (index 2), as this corresponds to tags which * are children of the `BODY` tag. This is used in {@see self::get_xpath()}. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @var array> */ private $open_stack_attributes = array(); @@ -204,7 +204,7 @@ final class OD_HTML_Tag_Processor extends WP_HTML_Tag_Processor { * This is used to store the old XPath format in a transitional period until which new URL Metrics are expected to * have been collected to purge out references to the old format. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @var string|null */ private $current_xpath = null; @@ -582,7 +582,7 @@ private function get_indexed_breadcrumbs(): Generator { * Themes utilize the 'wp-site-blocks' class name in the root `DIV`. Only one attribute is currently returned, * although potentially more could be returned if additional disambiguation is needed in the future. * - * @since 1.0.0-beta1 + * @since 1.0.0 * * @return array Disambiguating attributes. */ @@ -682,7 +682,7 @@ public function get_xpath(): string { * can simply be an alias for that one. See related logic in {@see OD_Element::get_xpath()}. This function is only * used internally by Optimization Detective in {@see od_optimize_template_output_buffer()}. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @todo Move the logic in this method to the get_xpath() method and let this be an alias for that method once the transitional period is over. * @access private * @@ -715,7 +715,7 @@ public function get_stored_xpath(): string { /** * Returns whether the processor is currently at or inside the admin bar. * - * @since 1.0.0-beta1 + * @since 1.0.0 * * @return bool Whether at or inside the admin bar. */ diff --git a/plugins/optimization-detective/class-od-tag-visitor-context.php b/plugins/optimization-detective/class-od-tag-visitor-context.php index 1398030b8c..09dba66c02 100644 --- a/plugins/optimization-detective/class-od-tag-visitor-context.php +++ b/plugins/optimization-detective/class-od-tag-visitor-context.php @@ -51,7 +51,7 @@ final class OD_Tag_Visitor_Context { /** * Visited tag state. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @var OD_Visited_Tag_State */ private $visited_tag_state; @@ -78,7 +78,7 @@ public function __construct( OD_HTML_Tag_Processor $processor, OD_URL_Metric_Gro * * Calling this method from a tag visitor has the same effect as a tag visitor returning `true`. * - * @since 1.0.0-beta1 + * @since 1.0.0 */ public function track_tag(): void { $this->visited_tag_state->track_tag(); diff --git a/plugins/optimization-detective/class-od-visited-tag-state.php b/plugins/optimization-detective/class-od-visited-tag-state.php index d7cedc4053..41b6460cde 100644 --- a/plugins/optimization-detective/class-od-visited-tag-state.php +++ b/plugins/optimization-detective/class-od-visited-tag-state.php @@ -3,7 +3,7 @@ * Optimization Detective: OD_Visited_Tag_State class * * @package optimization-detective - * @since 1.0.0-beta1 + * @since 1.0.0 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * State for a tag visitation when visited by tag visitors while walking over a document. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private */ final class OD_Visited_Tag_State { @@ -23,7 +23,7 @@ final class OD_Visited_Tag_State { /** * Whether the tag should be tracked among the elements in URL Metrics. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @var bool */ private $should_track_tag; @@ -38,7 +38,7 @@ public function __construct() { /** * Marks the tag for being tracked in URL Metrics. * - * @since 1.0.0-beta1 + * @since 1.0.0 */ public function track_tag(): void { $this->should_track_tag = true; @@ -47,7 +47,7 @@ public function track_tag(): void { /** * Whether the tag should be tracked among the elements in URL Metrics. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @return bool Whether tracked. */ public function is_tag_tracked(): bool { @@ -59,7 +59,7 @@ public function is_tag_tracked(): bool { * * This should be called after tag visitors have been invoked on a tag. * - * @since 1.0.0-beta1 + * @since 1.0.0 */ public function reset(): void { $this->should_track_tag = false; diff --git a/plugins/optimization-detective/detection.php b/plugins/optimization-detective/detection.php index ac49a97624..66eb08e999 100644 --- a/plugins/optimization-detective/detection.php +++ b/plugins/optimization-detective/detection.php @@ -87,7 +87,7 @@ function od_get_detection_script( string $slug, OD_URL_Metric_Group_Collection $ * Note that the attribution build is slightly larger than the standard build, so this is why it is not used by default. * The additional attribution data is made available to client-side extension script modules registered via the `od_extension_module_urls` filter. * - * @since 1.0.0-beta1 + * @since 1.0.0 * * @param bool $use_attribution_build Whether to use the attribution build. */ diff --git a/plugins/optimization-detective/optimization.php b/plugins/optimization-detective/optimization.php index 0f6b7fbdb3..a79aedc30e 100644 --- a/plugins/optimization-detective/optimization.php +++ b/plugins/optimization-detective/optimization.php @@ -130,7 +130,7 @@ function_exists( 'perflab_server_timing_use_output_buffer' ) * * This is only used when WP_DEBUG is enabled. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @param string[] $reasons Reason messages. diff --git a/plugins/optimization-detective/site-health.php b/plugins/optimization-detective/site-health.php index 968dc565ea..c698246205 100644 --- a/plugins/optimization-detective/site-health.php +++ b/plugins/optimization-detective/site-health.php @@ -3,7 +3,7 @@ * Site Health checks. * * @package optimization-detective - * @since 1.0.0-beta1 + * @since 1.0.0 */ // @codeCoverageIgnoreStart @@ -15,7 +15,7 @@ /** * Adds the Optimization Detective REST API check to site health tests. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @param array{direct: array}|mixed $tests Site Health Tests. @@ -39,7 +39,7 @@ function od_add_rest_api_availability_test( $tests ): array { /** * Tests availability of the Optimization Detective REST API endpoint. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @return array{label: string, status: string, badge: array{label: string, color: string}, description: string, actions: string, test: string} Result. @@ -68,7 +68,7 @@ function od_test_rest_api_availability(): array { * the admin. The reason for storing the negative unavailable state as opposed to the positive available state is that * when an option does not exist then `get_option()` returns `false` which is the same falsy value as the stored `'0'`. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @return bool Whether unavailable. @@ -80,7 +80,7 @@ function od_is_rest_api_unavailable(): bool { /** * Tests availability of the Optimization Detective REST API endpoint. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @param array|WP_Error $response REST API response. @@ -165,7 +165,7 @@ function od_compose_site_health_result( $response ): array { /** * Gets the response to an Optimization Detective REST API store request to confirm it is available to unauthenticated requests. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @param bool $use_cached Whether to use a previous response cached in a transient. @@ -195,7 +195,7 @@ function od_get_rest_api_health_check_response( bool $use_cached ) { /** * Renders an admin notice if the REST API health check fails. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @param bool $in_plugin_row Whether the notice is to be printed in the plugin row. @@ -251,7 +251,7 @@ function od_maybe_render_rest_api_health_check_admin_notice( bool $in_plugin_row /** * Displays an admin notice on the plugin row if the REST API health check fails. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private * * @param string $plugin_file Plugin file. @@ -273,7 +273,7 @@ function od_render_rest_api_health_check_admin_notice_in_plugin_row( string $plu * shown at the `admin_notices` action once, the notice will only be displayed inline with the plugin row thereafter * via {@see od_render_rest_api_health_check_admin_notice_in_plugin_row()}. * - * @since 1.0.0-beta1 + * @since 1.0.0 * @access private */ function od_maybe_run_rest_api_health_check(): void { From ea608a2831c8a284e18eb4dbe4098db766f86256 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 25 Jan 2025 14:28:16 -0800 Subject: [PATCH 4/5] Generate changelogs --- plugins/embed-optimizer/readme.txt | 4 ++++ plugins/image-prioritizer/readme.txt | 4 ++++ plugins/optimization-detective/readme.txt | 20 ++++++++++++++++++++ plugins/performance-lab/readme.txt | 6 ++++++ plugins/speculation-rules/readme.txt | 4 ++++ plugins/webp-uploads/readme.txt | 4 ++++ 6 files changed, 42 insertions(+) diff --git a/plugins/embed-optimizer/readme.txt b/plugins/embed-optimizer/readme.txt index 05ef33c22a..c85a314ae1 100644 --- a/plugins/embed-optimizer/readme.txt +++ b/plugins/embed-optimizer/readme.txt @@ -69,6 +69,10 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu = 0.4.1 = +**Bug Fixes** + +* Remove requirement for both mobile and desktop URL metrics to be collected for `preconnect` links to be added. ([1764](https://github.com/WordPress/performance/pull/1764)) + = 0.4.0 = **Enhancements** diff --git a/plugins/image-prioritizer/readme.txt b/plugins/image-prioritizer/readme.txt index 0df486f4db..c1e47602c3 100644 --- a/plugins/image-prioritizer/readme.txt +++ b/plugins/image-prioritizer/readme.txt @@ -72,6 +72,10 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu = 0.3.1 = +**Bug Fixes** + +* Remove erroneous check for resource initiator type when considering whether to submit LCP background image. ([1760](https://github.com/WordPress/performance/pull/1760)) + = 0.3.0 = **Enhancements** diff --git a/plugins/optimization-detective/readme.txt b/plugins/optimization-detective/readme.txt index 41e04e87b0..2245479996 100644 --- a/plugins/optimization-detective/readme.txt +++ b/plugins/optimization-detective/readme.txt @@ -57,6 +57,26 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu = 1.0.0-beta1 = +**Enhancements** + +* Add site health check to detect blocked REST API and short-circuit optimization when unavailable. ([1762](https://github.com/WordPress/performance/pull/1762)) +* Allow extensions to opt in to using the web-vitals attribution build via the `od_use_web_vitals_attribution_build` filter. ([1759](https://github.com/WordPress/performance/pull/1759)) +* Disambiguate XPaths for children of `BODY` with `id`, `class`, or `role` attributes. ([1797](https://github.com/WordPress/performance/pull/1797)) +* Eliminate varying URL Metrics by logged-in state and discontinue disabling optimization by default for admins. ([1788](https://github.com/WordPress/performance/pull/1788)) +* Improve test coverage for Optimization Detective. ([1817](https://github.com/WordPress/performance/pull/1817)) +* Introduce `OD_Tag_Visitor_Context::track_tag()` method as alternative for returning `true` in tag visitor callback. ([1821](https://github.com/WordPress/performance/pull/1821)) +* Omit element node index in XPaths up to children of BODY. ([1790](https://github.com/WordPress/performance/pull/1790)) +* Skip visiting tags in the Admin Bar when optimizing a page. ([1816](https://github.com/WordPress/performance/pull/1816)) + +**Bug Fixes** + +* Ensure optimization is performed in the wp-env local environment and log debug messages to console when disabled. ([1822](https://github.com/WordPress/performance/pull/1822)) +* Skip visiting any tags inside of `NOSCRIPT` elements. ([1783](https://github.com/WordPress/performance/pull/1783)) + +**Documentation** + +* Move Optimization Detective docs into [`README.md`](https://github.com/WordPress/performance/tree/trunk/plugins/optimization-detective/docs). ([1763](https://github.com/WordPress/performance/pull/1763)) + = 0.9.0 = **Enhancements** diff --git a/plugins/performance-lab/readme.txt b/plugins/performance-lab/readme.txt index d75fdd088a..86e165c0c6 100644 --- a/plugins/performance-lab/readme.txt +++ b/plugins/performance-lab/readme.txt @@ -73,6 +73,12 @@ Contributions are always welcome! Learn more about how to get involved in the [C = 3.8.0 = +**Enhancements** + +* Add Site Health check for `Cache-Control: no-store` page response header which disables bfcache. ([1807](https://github.com/WordPress/performance/pull/1807)) +* Add Site Health test to verify that static assets are served with far-future expires. ([1727](https://github.com/WordPress/performance/pull/1727)) +* Enqueue scripts using `plugins_url()` instead of `plugin_dir_url()`. ([1761](https://github.com/WordPress/performance/pull/1761)) + = 3.7.0 = **Enhancements** diff --git a/plugins/speculation-rules/readme.txt b/plugins/speculation-rules/readme.txt index 2792b5265d..40b2aab845 100644 --- a/plugins/speculation-rules/readme.txt +++ b/plugins/speculation-rules/readme.txt @@ -121,6 +121,10 @@ Contributions are always welcome! Learn more about how to get involved in the [C = 1.4.0 = +**Enhancements** + +* Implement speculative loading considerations for safer behavior. ([1784](https://github.com/WordPress/performance/pull/1784)) + = 1.3.1 = **Bug Fixes** diff --git a/plugins/webp-uploads/readme.txt b/plugins/webp-uploads/readme.txt index a53ffca20e..44740fadf5 100644 --- a/plugins/webp-uploads/readme.txt +++ b/plugins/webp-uploads/readme.txt @@ -62,6 +62,10 @@ By default, the Modern Image Formats plugin will only generate WebP versions of = 2.5.0 = +**Enhancements** + +* Switch to `wp_content_img_tag` filter for improved image handling. ([1772](https://github.com/WordPress/performance/pull/1772)) + = 2.4.0 = **Enhancements** From 9183df938a5ffa55d7b4da9b6562eceb0e5564f6 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 27 Jan 2025 09:59:17 -0800 Subject: [PATCH 5/5] Update changelog entry Co-authored-by: felixarntz --- plugins/performance-lab/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/performance-lab/readme.txt b/plugins/performance-lab/readme.txt index 86e165c0c6..d40febc004 100644 --- a/plugins/performance-lab/readme.txt +++ b/plugins/performance-lab/readme.txt @@ -75,7 +75,7 @@ Contributions are always welcome! Learn more about how to get involved in the [C **Enhancements** -* Add Site Health check for `Cache-Control: no-store` page response header which disables bfcache. ([1807](https://github.com/WordPress/performance/pull/1807)) +* Add Site Health test for `Cache-Control: no-store` page response header which disables bfcache. ([1807](https://github.com/WordPress/performance/pull/1807)) * Add Site Health test to verify that static assets are served with far-future expires. ([1727](https://github.com/WordPress/performance/pull/1727)) * Enqueue scripts using `plugins_url()` instead of `plugin_dir_url()`. ([1761](https://github.com/WordPress/performance/pull/1761))