diff --git a/README.md b/README.md index b99f70ce77..d46feffaf3 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,14 @@ The feature plugins which are currently featured by this plugin are: Plugin | Slug | Experimental | Links --------------------------------|---------------------------|--------------|------------- -[Image Placeholders][1] | `dominant-color-images` | No | [Source][8], [Issues][15], [PRs][22] -[Modern Image Formats][2] | `webp-uploads` | No | [Source][9], [Issues][16], [PRs][23] -[Performant Translations][3] | `performant-translations` | No | [Source][10], [Issues][17], [PRs][24] -[Speculative Loading][4] | `speculation-rules` | No | [Source][11], [Issues][18], [PRs][25] -[Embed Optimizer][5] | `embed-optimizer` | Yes | [Source][12], [Issues][19], [PRs][26] -[Enhanced Responsive Images][6] | `auto-sizes` | Yes | [Source][13], [Issues][20], [PRs][27] -[Image Prioritizer][7] | `image-prioritizer` | Yes | [Source][14], [Issues][21], [PRs][28] +[Image Placeholders][1] | `dominant-color-images` | No | [Source][9], [Issues][17], [PRs][25] +[Modern Image Formats][2] | `webp-uploads` | No | [Source][10], [Issues][18], [PRs][26] +[Performant Translations][3] | `performant-translations` | No | [Source][11], [Issues][19], [PRs][27] +[Speculative Loading][4] | `speculation-rules` | No | [Source][12], [Issues][20], [PRs][28] +[Embed Optimizer][5] | `embed-optimizer` | Yes | [Source][13], [Issues][21], [PRs][29] +[Enhanced Responsive Images][6] | `auto-sizes` | Yes | [Source][14], [Issues][22], [PRs][30] +[Image Prioritizer][7] | `image-prioritizer` | Yes | [Source][15], [Issues][23], [PRs][31] +[Web Worker Offloading][8] | `web-worker-offloading` | Yes | [Source][16], [Issues][24], [PRs][32] [1]: https://wordpress.org/plugins/dominant-color-images/ [2]: https://wordpress.org/plugins/webp-uploads/ @@ -26,29 +27,33 @@ Plugin | Slug | Experimental | Lin [5]: https://wordpress.org/plugins/embed-optimizer/ [6]: https://wordpress.org/plugins/auto-sizes/ [7]: https://wordpress.org/plugins/image-prioritizer/ - -[8]: https://github.com/WordPress/performance/tree/trunk/plugins/dominant-color-images -[9]: https://github.com/WordPress/performance/tree/trunk/plugins/webp-uploads -[10]: https://github.com/swissspidy/performant-translations -[11]: https://github.com/WordPress/performance/tree/trunk/plugins/speculation-rules -[12]: https://github.com/WordPress/performance/tree/trunk/plugins/embed-optimizer -[13]: https://github.com/WordPress/performance/tree/trunk/plugins/auto-sizes -[14]: https://github.com/WordPress/performance/tree/trunk/plugins/image-prioritizer - -[15]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22 -[16]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22 -[17]: https://github.com/swissspidy/performant-translations/issues -[18]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22 -[19]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22 -[20]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22 -[21]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22 - -[22]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22 -[23]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22 -[24]: https://github.com/swissspidy/performant-translations/pulls -[25]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22 -[26]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22 -[27]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22 -[28]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22 +[8]: https://wordpress.org/plugins/web-worker-offloading/ + +[9]: https://github.com/WordPress/performance/tree/trunk/plugins/dominant-color-images +[10]: https://github.com/WordPress/performance/tree/trunk/plugins/webp-uploads +[11]: https://github.com/swissspidy/performant-translations +[12]: https://github.com/WordPress/performance/tree/trunk/plugins/speculation-rules +[13]: https://github.com/WordPress/performance/tree/trunk/plugins/embed-optimizer +[14]: https://github.com/WordPress/performance/tree/trunk/plugins/auto-sizes +[15]: https://github.com/WordPress/performance/tree/trunk/plugins/image-prioritizer +[16]: https://github.com/WordPress/performance/tree/trunk/plugins/web-worker-offloading + +[17]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22 +[18]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22 +[19]: https://github.com/swissspidy/performant-translations/issues +[20]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22 +[21]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22 +[22]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22 +[23]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22 +[24]: https://github.com/WordPress/performance/issues?q=is%3Aopen%20label%3A%22%5BPlugin%5D%20Web%20Worker%20Offloading%22 + +[25]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22 +[26]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22 +[27]: https://github.com/swissspidy/performant-translations/pulls +[28]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22 +[29]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22 +[30]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22 +[31]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22 +[32]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Web%20Worker%20Offloading%22 Note that the plugin names sometimes diverge from the plugin slugs due to scope changes. For example, a plugin's purpose may change as some of its features are merged into WordPress core. diff --git a/plugins/auto-sizes/readme.txt b/plugins/auto-sizes/readme.txt index 582d84eded..b5cca63074 100644 --- a/plugins/auto-sizes/readme.txt +++ b/plugins/auto-sizes/readme.txt @@ -1,7 +1,7 @@ === Enhanced Responsive Images === Contributors: wordpressdotorg -Tested up to: 6.6 +Tested up to: 6.7 Stable tag: 1.3.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/plugins/dominant-color-images/readme.txt b/plugins/dominant-color-images/readme.txt index 2ac409272c..b639dc4e53 100644 --- a/plugins/dominant-color-images/readme.txt +++ b/plugins/dominant-color-images/readme.txt @@ -1,7 +1,7 @@ === Image Placeholders === Contributors: wordpressdotorg -Tested up to: 6.6 +Tested up to: 6.7 Stable tag: 1.1.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php b/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php index 4d57fe652a..072ab03257 100644 --- a/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php +++ b/plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php @@ -31,7 +31,7 @@ final class Embed_Optimizer_Tag_Visitor { /** * Determines whether the processor is currently at a figure.wp-block-embed tag. * - * @since n.e.x.t + * @since 0.3.0 * * @param OD_HTML_Tag_Processor $processor Processor. * @return bool Whether at the tag. @@ -47,7 +47,7 @@ private function is_embed_figure( OD_HTML_Tag_Processor $processor ): bool { /** * Determines whether the processor is currently at a div.wp-block-embed__wrapper tag (which is a child of figure.wp-block-embed). * - * @since n.e.x.t + * @since 0.3.0 * * @param OD_HTML_Tag_Processor $processor Processor. * @return bool Whether the tag should be measured and stored in URL metrics. @@ -196,7 +196,7 @@ public function __invoke( OD_Tag_Visitor_Context $context ): bool { /** * Gets the XPath for the embed wrapper DIV which is the sole child of the embed block FIGURE. * - * @since n.e.x.t + * @since 0.3.0 * * @param string $embed_block_xpath XPath for the embed block FIGURE tag. For example: `/*[1][self::HTML]/*[2][self::BODY]/*[1][self::FIGURE]`. * @return string XPath for the child DIV. For example: `/*[1][self::HTML]/*[2][self::BODY]/*[1][self::FIGURE]/*[1][self::DIV]` @@ -208,7 +208,7 @@ private static function get_embed_wrapper_xpath( string $embed_block_xpath ): st /** * Reduces layout shifts. * - * @since n.e.x.t + * @since 0.3.0 * * @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block. */ diff --git a/plugins/embed-optimizer/hooks.php b/plugins/embed-optimizer/hooks.php index a2bc20a348..5dffa10f5a 100644 --- a/plugins/embed-optimizer/hooks.php +++ b/plugins/embed-optimizer/hooks.php @@ -26,7 +26,7 @@ function embed_optimizer_add_hooks(): void { /** * Adds hooks for when the Optimization Detective logic is not running. * - * @since n.e.x.t + * @since 0.3.0 */ function embed_optimizer_add_non_optimization_detective_hooks(): void { if ( false === has_action( 'od_register_tag_visitors', 'embed_optimizer_register_tag_visitors' ) ) { @@ -37,7 +37,7 @@ function embed_optimizer_add_non_optimization_detective_hooks(): void { /** * Initializes Embed Optimizer when Optimization Detective has loaded. * - * @since n.e.x.t + * @since 0.3.0 * * @param string $optimization_detective_version Current version of the optimization detective plugin. */ @@ -81,7 +81,7 @@ function embed_optimizer_register_tag_visitors( OD_Tag_Visitor_Registry $registr /** * Filters additional properties for the element item schema for Optimization Detective. * - * @since n.e.x.t + * @since 0.3.0 * * @param array $additional_properties Additional properties. * @return array Additional properties. @@ -112,7 +112,7 @@ function embed_optimizer_add_element_item_schema_properties( array $additional_p /** * Filters the list of Optimization Detective extension module URLs to include the extension for Embed Optimizer. * - * @since n.e.x.t + * @since 0.3.0 * * @param string[]|mixed $extension_module_urls Extension module URLs. * @return string[] Extension module URLs. @@ -130,7 +130,7 @@ function embed_optimizer_filter_extension_module_urls( $extension_module_urls ): * * This ensures that the module for handling embeds is only loaded when there is an embed on the page. * - * @since n.e.x.t + * @since 0.3.0 * * @param string|mixed $html The oEmbed HTML. * @return string Unchanged oEmbed HTML. diff --git a/plugins/embed-optimizer/load.php b/plugins/embed-optimizer/load.php index 002cf97877..2124b666e5 100644 --- a/plugins/embed-optimizer/load.php +++ b/plugins/embed-optimizer/load.php @@ -5,7 +5,7 @@ * Description: Optimizes the performance of embeds by lazy-loading iframes and scripts. * Requires at least: 6.5 * Requires PHP: 7.2 - * Version: 0.3.0-alpha + * Version: 0.3.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later @@ -70,7 +70,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi } )( 'embed_optimizer_pending_plugin', - '0.3.0-alpha', + '0.3.0', 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 8157189226..5fb24d2b7c 100644 --- a/plugins/embed-optimizer/readme.txt +++ b/plugins/embed-optimizer/readme.txt @@ -1,8 +1,8 @@ === Embed Optimizer === Contributors: wordpressdotorg -Tested up to: 6.6 -Stable tag: 0.2.0 +Tested up to: 6.7 +Stable tag: 0.3.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: performance, embeds @@ -51,6 +51,13 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu == Changelog == += 0.3.0 = + +**Enhancements** + +* Leverage URL metrics to reserve space for embeds to reduce CLS. ([1373](https://github.com/WordPress/performance/pull/1373)) +* Avoid lazy-loading images and embeds unless there are URL Metrics for both mobile and desktop. ([1604](https://github.com/WordPress/performance/pull/1604)) + = 0.2.0 = **Enhancements** diff --git a/plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php b/plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php index f5e0578e5b..832db34f21 100644 --- a/plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php +++ b/plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php @@ -42,7 +42,7 @@ protected function is_data_url( string $url ): bool { /** * Gets attribute value for select attributes. * - * @since n.e.x.t + * @since 0.2.0 * @todo Move this into the OD_HTML_Tag_Processor/OD_HTML_Processor class eventually. * * @phpstan-param NormalizedAttributeNames $attribute_name diff --git a/plugins/image-prioritizer/class-image-prioritizer-video-tag-visitor.php b/plugins/image-prioritizer/class-image-prioritizer-video-tag-visitor.php index f29d19455e..060f0b8994 100644 --- a/plugins/image-prioritizer/class-image-prioritizer-video-tag-visitor.php +++ b/plugins/image-prioritizer/class-image-prioritizer-video-tag-visitor.php @@ -5,7 +5,7 @@ * * @package image-prioritizer * - * @since n.e.x.t + * @since 0.2.0 */ // Exit if accessed directly. @@ -16,7 +16,7 @@ /** * Image Prioritizer: Image_Prioritizer_Video_Tag_Visitor class * - * @since n.e.x.t + * @since 0.2.0 * * @access private */ @@ -25,7 +25,7 @@ final class Image_Prioritizer_Video_Tag_Visitor extends Image_Prioritizer_Tag_Vi /** * Class name used to indicate a video which is lazy-loaded. * - * @since n.e.x.t + * @since 0.2.0 * @var string */ const LAZY_VIDEO_CLASS_NAME = 'od-lazy-video'; @@ -33,7 +33,7 @@ final class Image_Prioritizer_Video_Tag_Visitor extends Image_Prioritizer_Tag_Vi /** * Whether the lazy-loading script was added to the body. * - * @since n.e.x.t + * @since 0.2.0 * @var bool */ protected $added_lazy_script = false; @@ -41,7 +41,7 @@ final class Image_Prioritizer_Video_Tag_Visitor extends Image_Prioritizer_Tag_Vi /** * Visits a tag. * - * @since n.e.x.t + * @since 0.2.0 * * @param OD_Tag_Visitor_Context $context Tag visitor context. * @return bool Whether the tag should be tracked in URL metrics. @@ -69,7 +69,7 @@ public function __invoke( OD_Tag_Visitor_Context $context ): bool { * * Skips empty poster attributes and data: URLs. * - * @since n.e.x.t + * @since 0.2.0 * * @param OD_Tag_Visitor_Context $context Tag visitor context. * @return non-empty-string|null Poster or null if not defined or is a data: URL. @@ -85,7 +85,7 @@ private function get_poster( OD_Tag_Visitor_Context $context ): ?string { /** * Reduces poster image size by choosing one that fits the maximum video size more closely. * - * @since n.e.x.t + * @since 0.2.0 * * @param non-empty-string $poster Poster image URL. * @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at a VIDEO tag. @@ -128,7 +128,7 @@ private function reduce_poster_image_size( string $poster, OD_Tag_Visitor_Contex /** * Preloads poster image for the LCP