Skip to content

Commit cb1d472

Browse files
authored
Merge pull request #1611 from WordPress/release/3.5.0
Post 3.5.0 release merge
2 parents 7eccb23 + 6cc4ba5 commit cb1d472

31 files changed

+175
-119
lines changed

README.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ The feature plugins which are currently featured by this plugin are:
1111

1212
Plugin | Slug | Experimental | Links
1313
--------------------------------|---------------------------|--------------|-------------
14-
[Image Placeholders][1] | `dominant-color-images` | No | [Source][8], [Issues][15], [PRs][22]
15-
[Modern Image Formats][2] | `webp-uploads` | No | [Source][9], [Issues][16], [PRs][23]
16-
[Performant Translations][3] | `performant-translations` | No | [Source][10], [Issues][17], [PRs][24]
17-
[Speculative Loading][4] | `speculation-rules` | No | [Source][11], [Issues][18], [PRs][25]
18-
[Embed Optimizer][5] | `embed-optimizer` | Yes | [Source][12], [Issues][19], [PRs][26]
19-
[Enhanced Responsive Images][6] | `auto-sizes` | Yes | [Source][13], [Issues][20], [PRs][27]
20-
[Image Prioritizer][7] | `image-prioritizer` | Yes | [Source][14], [Issues][21], [PRs][28]
14+
[Image Placeholders][1] | `dominant-color-images` | No | [Source][9], [Issues][17], [PRs][25]
15+
[Modern Image Formats][2] | `webp-uploads` | No | [Source][10], [Issues][18], [PRs][26]
16+
[Performant Translations][3] | `performant-translations` | No | [Source][11], [Issues][19], [PRs][27]
17+
[Speculative Loading][4] | `speculation-rules` | No | [Source][12], [Issues][20], [PRs][28]
18+
[Embed Optimizer][5] | `embed-optimizer` | Yes | [Source][13], [Issues][21], [PRs][29]
19+
[Enhanced Responsive Images][6] | `auto-sizes` | Yes | [Source][14], [Issues][22], [PRs][30]
20+
[Image Prioritizer][7] | `image-prioritizer` | Yes | [Source][15], [Issues][23], [PRs][31]
21+
[Web Worker Offloading][8] | `web-worker-offloading` | Yes | [Source][16], [Issues][24], [PRs][32]
2122

2223
[1]: https://wordpress.org/plugins/dominant-color-images/
2324
[2]: https://wordpress.org/plugins/webp-uploads/
@@ -26,29 +27,33 @@ Plugin | Slug | Experimental | Lin
2627
[5]: https://wordpress.org/plugins/embed-optimizer/
2728
[6]: https://wordpress.org/plugins/auto-sizes/
2829
[7]: https://wordpress.org/plugins/image-prioritizer/
29-
30-
[8]: https://github.com/WordPress/performance/tree/trunk/plugins/dominant-color-images
31-
[9]: https://github.com/WordPress/performance/tree/trunk/plugins/webp-uploads
32-
[10]: https://github.com/swissspidy/performant-translations
33-
[11]: https://github.com/WordPress/performance/tree/trunk/plugins/speculation-rules
34-
[12]: https://github.com/WordPress/performance/tree/trunk/plugins/embed-optimizer
35-
[13]: https://github.com/WordPress/performance/tree/trunk/plugins/auto-sizes
36-
[14]: https://github.com/WordPress/performance/tree/trunk/plugins/image-prioritizer
37-
38-
[15]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22
39-
[16]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22
40-
[17]: https://github.com/swissspidy/performant-translations/issues
41-
[18]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22
42-
[19]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22
43-
[20]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22
44-
[21]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22
45-
46-
[22]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22
47-
[23]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22
48-
[24]: https://github.com/swissspidy/performant-translations/pulls
49-
[25]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22
50-
[26]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22
51-
[27]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22
52-
[28]: https://github.com/WordPress/performance/pulls?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22
30+
[8]: https://wordpress.org/plugins/web-worker-offloading/
31+
32+
[9]: https://github.com/WordPress/performance/tree/trunk/plugins/dominant-color-images
33+
[10]: https://github.com/WordPress/performance/tree/trunk/plugins/webp-uploads
34+
[11]: https://github.com/swissspidy/performant-translations
35+
[12]: https://github.com/WordPress/performance/tree/trunk/plugins/speculation-rules
36+
[13]: https://github.com/WordPress/performance/tree/trunk/plugins/embed-optimizer
37+
[14]: https://github.com/WordPress/performance/tree/trunk/plugins/auto-sizes
38+
[15]: https://github.com/WordPress/performance/tree/trunk/plugins/image-prioritizer
39+
[16]: https://github.com/WordPress/performance/tree/trunk/plugins/web-worker-offloading
40+
41+
[17]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22
42+
[18]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22
43+
[19]: https://github.com/swissspidy/performant-translations/issues
44+
[20]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22
45+
[21]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22
46+
[22]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22
47+
[23]: https://github.com/WordPress/performance/issues?q=is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22
48+
[24]: https://github.com/WordPress/performance/issues?q=is%3Aopen%20label%3A%22%5BPlugin%5D%20Web%20Worker%20Offloading%22
49+
50+
[25]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Image+Placeholders%22
51+
[26]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Modern+Image+Formats%22
52+
[27]: https://github.com/swissspidy/performant-translations/pulls
53+
[28]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Speculative+Loading%22
54+
[29]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Embed+Optimizer%22
55+
[30]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Enhanced+Responsive+Images%22
56+
[31]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Image+Prioritizer%22
57+
[32]: https://github.com/WordPress/performance/pulls?q=is%3Apr+is%3Aopen+label%3A%22%5BPlugin%5D+Web%20Worker%20Offloading%22
5358

5459
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.

plugins/auto-sizes/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== Enhanced Responsive Images ===
22

33
Contributors: wordpressdotorg
4-
Tested up to: 6.6
4+
Tested up to: 6.7
55
Stable tag: 1.3.0
66
License: GPLv2 or later
77
License URI: https://www.gnu.org/licenses/gpl-2.0.html

plugins/dominant-color-images/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== Image Placeholders ===
22

33
Contributors: wordpressdotorg
4-
Tested up to: 6.6
4+
Tested up to: 6.7
55
Stable tag: 1.1.2
66
License: GPLv2 or later
77
License URI: https://www.gnu.org/licenses/gpl-2.0.html

plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class Embed_Optimizer_Tag_Visitor {
3131
/**
3232
* Determines whether the processor is currently at a figure.wp-block-embed tag.
3333
*
34-
* @since n.e.x.t
34+
* @since 0.3.0
3535
*
3636
* @param OD_HTML_Tag_Processor $processor Processor.
3737
* @return bool Whether at the tag.
@@ -47,7 +47,7 @@ private function is_embed_figure( OD_HTML_Tag_Processor $processor ): bool {
4747
/**
4848
* Determines whether the processor is currently at a div.wp-block-embed__wrapper tag (which is a child of figure.wp-block-embed).
4949
*
50-
* @since n.e.x.t
50+
* @since 0.3.0
5151
*
5252
* @param OD_HTML_Tag_Processor $processor Processor.
5353
* @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 {
196196
/**
197197
* Gets the XPath for the embed wrapper DIV which is the sole child of the embed block FIGURE.
198198
*
199-
* @since n.e.x.t
199+
* @since 0.3.0
200200
*
201201
* @param string $embed_block_xpath XPath for the embed block FIGURE tag. For example: `/*[1][self::HTML]/*[2][self::BODY]/*[1][self::FIGURE]`.
202202
* @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
208208
/**
209209
* Reduces layout shifts.
210210
*
211-
* @since n.e.x.t
211+
* @since 0.3.0
212212
*
213213
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.
214214
*/

plugins/embed-optimizer/hooks.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function embed_optimizer_add_hooks(): void {
2626
/**
2727
* Adds hooks for when the Optimization Detective logic is not running.
2828
*
29-
* @since n.e.x.t
29+
* @since 0.3.0
3030
*/
3131
function embed_optimizer_add_non_optimization_detective_hooks(): void {
3232
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 {
3737
/**
3838
* Initializes Embed Optimizer when Optimization Detective has loaded.
3939
*
40-
* @since n.e.x.t
40+
* @since 0.3.0
4141
*
4242
* @param string $optimization_detective_version Current version of the optimization detective plugin.
4343
*/
@@ -81,7 +81,7 @@ function embed_optimizer_register_tag_visitors( OD_Tag_Visitor_Registry $registr
8181
/**
8282
* Filters additional properties for the element item schema for Optimization Detective.
8383
*
84-
* @since n.e.x.t
84+
* @since 0.3.0
8585
*
8686
* @param array<string, array{type: string}> $additional_properties Additional properties.
8787
* @return array<string, array{type: string}> Additional properties.
@@ -112,7 +112,7 @@ function embed_optimizer_add_element_item_schema_properties( array $additional_p
112112
/**
113113
* Filters the list of Optimization Detective extension module URLs to include the extension for Embed Optimizer.
114114
*
115-
* @since n.e.x.t
115+
* @since 0.3.0
116116
*
117117
* @param string[]|mixed $extension_module_urls Extension module URLs.
118118
* @return string[] Extension module URLs.
@@ -130,7 +130,7 @@ function embed_optimizer_filter_extension_module_urls( $extension_module_urls ):
130130
*
131131
* This ensures that the module for handling embeds is only loaded when there is an embed on the page.
132132
*
133-
* @since n.e.x.t
133+
* @since 0.3.0
134134
*
135135
* @param string|mixed $html The oEmbed HTML.
136136
* @return string Unchanged oEmbed HTML.

plugins/embed-optimizer/load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Optimizes the performance of embeds by lazy-loading iframes and scripts.
66
* Requires at least: 6.5
77
* Requires PHP: 7.2
8-
* Version: 0.3.0-alpha
8+
* Version: 0.3.0
99
* Author: WordPress Performance Team
1010
* Author URI: https://make.wordpress.org/performance/
1111
* License: GPLv2 or later
@@ -70,7 +70,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi
7070
}
7171
)(
7272
'embed_optimizer_pending_plugin',
73-
'0.3.0-alpha',
73+
'0.3.0',
7474
static function ( string $version ): void {
7575
if ( defined( 'EMBED_OPTIMIZER_VERSION' ) ) {
7676
return;

plugins/embed-optimizer/readme.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
=== Embed Optimizer ===
22

33
Contributors: wordpressdotorg
4-
Tested up to: 6.6
5-
Stable tag: 0.2.0
4+
Tested up to: 6.7
5+
Stable tag: 0.3.0
66
License: GPLv2 or later
77
License URI: https://www.gnu.org/licenses/gpl-2.0.html
88
Tags: performance, embeds
@@ -51,6 +51,13 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu
5151

5252
== Changelog ==
5353

54+
= 0.3.0 =
55+
56+
**Enhancements**
57+
58+
* Leverage URL metrics to reserve space for embeds to reduce CLS. ([1373](https://github.com/WordPress/performance/pull/1373))
59+
* Avoid lazy-loading images and embeds unless there are URL Metrics for both mobile and desktop. ([1604](https://github.com/WordPress/performance/pull/1604))
60+
5461
= 0.2.0 =
5562

5663
**Enhancements**

plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function is_data_url( string $url ): bool {
4242
/**
4343
* Gets attribute value for select attributes.
4444
*
45-
* @since n.e.x.t
45+
* @since 0.2.0
4646
* @todo Move this into the OD_HTML_Tag_Processor/OD_HTML_Processor class eventually.
4747
*
4848
* @phpstan-param NormalizedAttributeNames $attribute_name

plugins/image-prioritizer/class-image-prioritizer-video-tag-visitor.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @package image-prioritizer
77
*
8-
* @since n.e.x.t
8+
* @since 0.2.0
99
*/
1010

1111
// Exit if accessed directly.
@@ -16,7 +16,7 @@
1616
/**
1717
* Image Prioritizer: Image_Prioritizer_Video_Tag_Visitor class
1818
*
19-
* @since n.e.x.t
19+
* @since 0.2.0
2020
*
2121
* @access private
2222
*/
@@ -25,23 +25,23 @@ final class Image_Prioritizer_Video_Tag_Visitor extends Image_Prioritizer_Tag_Vi
2525
/**
2626
* Class name used to indicate a video which is lazy-loaded.
2727
*
28-
* @since n.e.x.t
28+
* @since 0.2.0
2929
* @var string
3030
*/
3131
const LAZY_VIDEO_CLASS_NAME = 'od-lazy-video';
3232

3333
/**
3434
* Whether the lazy-loading script was added to the body.
3535
*
36-
* @since n.e.x.t
36+
* @since 0.2.0
3737
* @var bool
3838
*/
3939
protected $added_lazy_script = false;
4040

4141
/**
4242
* Visits a tag.
4343
*
44-
* @since n.e.x.t
44+
* @since 0.2.0
4545
*
4646
* @param OD_Tag_Visitor_Context $context Tag visitor context.
4747
* @return bool Whether the tag should be tracked in URL metrics.
@@ -69,7 +69,7 @@ public function __invoke( OD_Tag_Visitor_Context $context ): bool {
6969
*
7070
* Skips empty poster attributes and data: URLs.
7171
*
72-
* @since n.e.x.t
72+
* @since 0.2.0
7373
*
7474
* @param OD_Tag_Visitor_Context $context Tag visitor context.
7575
* @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 {
8585
/**
8686
* Reduces poster image size by choosing one that fits the maximum video size more closely.
8787
*
88-
* @since n.e.x.t
88+
* @since 0.2.0
8989
*
9090
* @param non-empty-string $poster Poster image URL.
9191
* @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
128128
/**
129129
* Preloads poster image for the LCP <video> element.
130130
*
131-
* @since n.e.x.t
131+
* @since 0.2.0
132132
*
133133
* @param non-empty-string $poster Poster image URL.
134134
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at a VIDEO tag.
@@ -164,7 +164,7 @@ private function preload_poster_image( string $poster, OD_Tag_Visitor_Context $c
164164
/**
165165
* Optimizes the VIDEO tag based on whether it is the LCP element or else whether it is displayed in any initial viewport.
166166
*
167-
* @since n.e.x.t
167+
* @since 0.2.0
168168
*
169169
* @param non-empty-string|null $poster Poster image URL.
170170
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.

plugins/image-prioritizer/helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Initializes Image Prioritizer when Optimization Detective has loaded.
1515
*
16-
* @since n.e.x.t
16+
* @since 0.2.0
1717
*
1818
* @param string $optimization_detective_version Current version of the optimization detective plugin.
1919
*/

0 commit comments

Comments
 (0)