Embed Optimizer source code
By WordPress Performance Team, on WordPress.org since 2024. 50,000+ active installs.
This plugin’s purpose is to optimize the performance of embeds in WordPress, such as Tweets, YouTube videos, TikToks, and others. The current optimizations include: Lazy loading embeds just before they come into view. Below is its source code for every one of its 13 releases, what changed in the latest one, and how often it ships.
What changed in 1.0.0-beta6
Released Aug 26, 2026, 5 months after 1.0.0-beta5- 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)
8 files changed since 1.0.0-beta5: 8 modified, 0 added, 0 removed.
- class-embed-optimizer-tag-visitor.php modified, +29 bytes
- detect.js modified, +3 bytes
- detect.min.js modified, -21 bytes
- helper.php modified, +117 bytes
- hooks.php modified, +30 bytes
- lazy-load.min.js modified, -2 bytes
- load.php modified, +30 bytes
- readme.txt modified, +517 bytes
Release history
13 releases since March 2024- 1.0.0-beta6 Aug 26, 2026 Add declare( strict_types = 1 ) to all PHP files. (2424)
- 1.0.0-beta5 Feb 27, 2026 Switch initial viewport embeds from preconnect to dns-prefetch links. (2256)
- 1.0.0-beta4 Feb 20, 2026 Add escaping for ID selector in styles added to reduce layout shifts. This fixes an XSS security vulnerability which required an authenticated user with at least a contributor role. Props to duc193 for responsible disclosure. (2397)
- 1.0.0-beta3 Jan 9, 2026 Add URL Metric mutation helpers to extension initialization API. (1951)
- 1.0.0-beta2 Dec 2, 2025 Update OD_HTML_Tag_Processor::next_tag() to allow $query arg and prepare to skip visiting tag closers by default. (1872)