Embed Optimizer source code

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

Browse code Download zip

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.

Compare 1.0.0-beta5 with 1.0.0-beta6

Release history

13 releases since March 2024
  1. 1.0.0-beta6 Aug 26, 2026 Add declare( strict_types = 1 ) to all PHP files. (2424)
  2. 1.0.0-beta5 Feb 27, 2026 Switch initial viewport embeds from preconnect to dns-prefetch links. (2256)
  3. 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)
  4. 1.0.0-beta3 Jan 9, 2026 Add URL Metric mutation helpers to extension initialization API. (1951)
  5. 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)
Full Embed Optimizer changelog with diffs

Source of 1.0.0-beta6

9 files
Browse all Embed Optimizer 1.0.0-beta6 files Browse trunk