Skip to content

Version 2.6 with "Dominant Color" bug revised so it doesn't add background color to transparent images.

License

Notifications You must be signed in to change notification settings

estlacksensory/WP-Performance-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

=== Performance Lab ===

Contributors:      wordpressdotorg
Requires at least: 6.1
Tested up to:      6.3
Requires PHP:      5.6
Stable tag:        2.6.0
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Tags:              performance, images, javascript, site health, measurement, object caching

Performance plugin from the WordPress Performance Team, which is a collection of standalone performance modules.

== Description ==

The Performance Lab plugin is a collection of modules focused on enhancing performance of your site, most of which should eventually be merged into WordPress core. The plugin allows to individually enable and test the modules to get their benefits before they become available in WordPress core, and to provide feedback to further improve the solutions.

Currently the plugin includes the following performance modules:

* **Dominant Color Images:** Adds support to store the dominant color of newly uploaded images and create a placeholder background of that color.
* **Fetchpriority:** Adds a fetchpriority hint for the primary content image on the page to load faster.
* **WebP Support Health Check:** Adds a WebP support check in Site Health status.
* **WebP Uploads:** Creates WebP versions for new JPEG image uploads if supported by the server.
* **Enqueued Assets Health Check:** Adds a CSS and JS resource check in Site Health status.
* **Autoloaded Options Health Check:** Adds a check for autoloaded options in Site Health status.

== Installation ==

= Installation from within WordPress =

1. Visit **Plugins > Add New**.
2. Search for **Performance Lab**.
3. Install and activate the Performance Lab plugin.

= Manual installation =

1. Upload the entire `performance-lab` folder to the `/wp-content/plugins/` directory.
2. Visit **Plugins**.
3. Activate the Performance Lab plugin.

= After activation =

1. Visit the new **Settings > Performance** menu.
2. Enable the individual modules you would like to use.

== Frequently Asked Questions ==

= What is the purpose of this plugin? =

The primary purpose of the Performance Lab plugin is to allow testing of various performance modules for which the goal is to eventually land in WordPress core. It is essentially a collection of "feature plugins", which makes it different from other performance plugins that offer performance features which are not targeted at WordPress core and potentially rely on functionality that would not be feasible to use in WordPress core. The list of available modules will regularly change: Existing modules may be removed after they have been released in WordPress core, while new modules may be added in any release.

= Can I use this plugin on my production site? =

Per the primary purpose of the plugin (see above), it can mostly be considered a beta testing plugin for the various performance modules it includes. However, unless a module is explicitly marked as "experimental", it has been tested and established to a degree where it should be okay to use in production. Still, as with every plugin, you are doing so at your own risk.

= Where can I submit my plugin feedback? =

Feedback is encouraged and much appreciated, especially since this plugin is a collection of future WordPress core features. If you have suggestions or requests for new features, you can [submit them as an issue in the Performance Lab GitHub repository](https://github.com/WordPress/performance/issues/new/choose). If you need help with troubleshooting or have a question about the plugin, please [create a new topic on our support forum](https://wordpress.org/support/plugin/performance-lab/#new-topic-0).

= Where can I report security bugs? =

The Performance team and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.

To report a security issue, please visit the [WordPress HackerOne](https://hackerone.com/wordpress) program.

= How can I contribute to the plugin? =

Contributions are always welcome! Learn more about how to get involved in the [Core Performance Team Handbook](https://make.wordpress.org/performance/handbook/get-involved/).

= I've activated the WebP Uploads module, but WebP images are not always generated when I upload a JPEG image. Why? =

There are two primary reasons that a WebP image may not be generated:

1. Performance Lab has identified that the WebP version of the uploaded JPEG image would have a larger file size than the original JPEG image, so it does not generate the WebP version.
2. The JPEG image was not uploaded to the [Media Library](https://wordpress.com/support/media/). At this time, WebP versions are only generated for images to the Media Library. WebP versions are not generated for JPEG images that are added to your site in other ways, such as in a template file or the [Customizer](https://wordpress.com/support/customizer/).

= With the WebP Uploads module activated, will the plugin generate JPEG and WebP versions of every image that I upload? =

By default, the WebP Uploads module will only generate WebP versions of the images that you upload. If you wish to have both WebP **and** JPEG versions generated, you can navigate to **Settings > Media** and enable the **Generate JPEG files in addition to WebP** option.

== Changelog ==

= 2.6.0 =

**Features**

* Infrastructure: Add output buffering checkbox to Server-Timing screen. ([801](WordPress/performance#801))
* Infrastructure: Implement logic to measure specific hook execution time with Server-Timing controlled by a WP Admin screen. ([784](WordPress/performance#784))

**Enhancements**

* Images: Fix incorrect function prefixes in Dominant Color Images. ([789](WordPress/performance#789))
* Infrastructure: Add early exit clauses to files with procedural code. ([790](WordPress/performance#790))
* Infrastructure: Allow disabling Server-Timing entirely using `PERFLAB_DISABLE_SERVER_TIMING` constant. ([795](WordPress/performance#795))

**Bug Fixes**

* Images: Fix WebP handling when editing images based on WordPress 6.3 change. ([796](WordPress/performance#796))
* Infrastructure: Fix errors detected by Plugin Checker. ([788](WordPress/performance#788))

= 2.5.0 =

**Enhancements**

* Images: Check for fetchpriority feature being available in WordPress core before loading the module. ([769](WordPress/performance#769))
* Database Optimization: Remove SQLite module. ([764](WordPress/performance#764))
* Infrastructure: Bump tested up to version to 6.3. ([772](WordPress/performance#772))

= 2.4.0 =

**Enhancements**

* Database: Implement migration prompt to migrate from SQLite module to standalone plugin due to removal in the following release. ([739](WordPress/performance#739))
* Infrastructure: Enhance code quality by adding PHPStan and fixing level 0 issues. ([730](WordPress/performance#730))
* Infrastructure: Use static closures for minor performance improvement whenever instance access is not needed. ([729](WordPress/performance#729))

**Bug Fixes**

* Database: Fix SQLite module deactivation routine to make standalone plugin migration work correctly. ([743](WordPress/performance#743))
* Infrastructure: Make `Server-Timing` header output more robust. ([736](WordPress/performance#736))

= 2.3.0 =

**Enhancements**

* Images: Configure `Dominant Color` and `Fetchpriority` modules for their standalone plugins. ([704](WordPress/performance#704))
* Infrastructure: Temporarily remove Dominant Color Images from standalone `plugins.json` definition. ([719](WordPress/performance#719))
* Infrastructure: Use dynamic version from `plugins.json` for manual workflow. ([710](WordPress/performance#710))

**Bug Fixes**

* Images: Add dominant color styling before any existing inline style attributes. ([716](WordPress/performance#716))
* Infrastructure: Resolve low-severity security advisory [GHSA-66qq-69rw-6x63](https://github.com/WordPress/performance/security/advisories/GHSA-66qq-69rw-6x63).

= 2.2.0 =

**Enhancements**

* Images: Remove "experimental" flag from Fetchpriority module. ([702](WordPress/performance#702))
* Infrastructure: Implement infrastructure for launching standalone plugins from modules, including WebP Uploads. ([699](WordPress/performance#699))
* Infrastructure: Include `WordPress-Extra` rules in PHPCS configuration and fix resulting problems. ([695](WordPress/performance#695))

**Bug Fixes**

* Images: Sanitize target param before using it. ([690](WordPress/performance#690))

**Documentation**

* Images: Change module slug/directory from `dominant-color` to `dominant-color-images`. ([708](WordPress/performance#708))
* Images: Rename `Dominant Color` module to `Dominant Color images`. ([705](WordPress/performance#705))

= 2.1.0 =

**Enhancements**

* Infrastructure: Add `wp-total` metric to default Server-Timing metrics. ([669](WordPress/performance#669))
* Infrastructure: Ensure module `load.php` files really only load other code to prevent conflicts in standalone plugins. ([674](WordPress/performance#674))

**Bug Fixes**

* Infrastructure: Fix problems with placing `object-cache.php` drop-in. ([672](WordPress/performance#672))

= 2.0.0 =

**Enhancements**

* Object Cache: Update WordPress version to 6.1 and remove Cache modules. ([641](WordPress/performance#641))
* Measurement: Add `perflab_disable_object_cache_dropin` filter. ([629](WordPress/performance#629))
* Database: Add an indicator in the adminbar to show when using SQLite. ([604](WordPress/performance#604))

**Bug Fixes**

* Images: Check for existing `$metadata['sizes']` to fix PHP warning. ([648](WordPress/performance#648))
* Images: Use correct number of arguments in filter callback. ([634](WordPress/performance#634))
* Database: Fix invalid docs and return types as highlighted by static analysis. ([645](WordPress/performance#645))
* Infrastructure: Fix incorrect usage of `plugin_action_links_*` filter. ([647](WordPress/performance#647))

**Documentation**

* Infrastructure: Add file header to object-cache drop-in to clarify purpose. ([649](WordPress/performance#649))

= 1.9.0 =

**Enhancements**

* Database: Remove warning about multi-server environment from the SQLite module description. ([619](WordPress/performance#619))

**Bug Fixes**

* Infrastructure: Enhance object-cache.php drop-in interoperability with other plugins. ([616](WordPress/performance#616))

= 1.8.0 =

**Features**

* Measurement: Implement Server-Timing API foundation as well as basic load time metrics. ([553](WordPress/performance#553))
* Database: Implement new experimental SQLite integration module. ([547](WordPress/performance#547))
* Images: Implement new experimental `fetchpriority` module. ([528](WordPress/performance#528))

**Bug Fixes**

* Database: Fix SQLite notices related to undefined properties. ([600](WordPress/performance#600))
* Database: Fix incorrect handling of `admin_email` and actual admin user's email when original `admin_email` user was deleted. ([603](WordPress/performance#603))
* Database: Make WP filesystem setup more robust to prevent potential errors. ([595](WordPress/performance#595))

= 1.7.0 =

**Enhancements**

* Images: Change WP Image editor quality for mime types. ([571](WordPress/performance#571))
* Infrastructure: Introduce database focus area, rename JavaScript focus area to JS & CSS, and phase out Site Health focus area. ([566](WordPress/performance#566))

**Bug Fixes**

* Images: Avoid potentially adding invalid attributes or duplicates for dominant color images. ([578](WordPress/performance#578))
* Images: Fix fatal error in REST API response when an image has no attachment metadata. ([568](WordPress/performance#568))
* Images: Fix image focal point bug when dominant color is enabled by not overriding `style` attribute. ([582](WordPress/performance#582))
* Images: Fix opt-in checkbox for generating WebP and JPEG to also show on Multisite. ([565](WordPress/performance#565))

= 1.6.0 =

**Enhancements**

* Site Health: Only load Site Health checks for persistent cache and full page cache when not available in core. ([543](WordPress/performance#543))
* Images: Add checkbox to Settings > Media to control whether to generate JPEG in addition to WebP. ([537](WordPress/performance#537))
* Images: Generate only WebP images by default for JPEG and WebP uploads. ([527](WordPress/performance#527))
* Infrastructure: Bump minimum WordPress requirement to 6.0. ([549](WordPress/performance#549))

= 1.5.0 =

**Enhancements**

* Site Health: Improve autoloaded options check by highlighting largest autoloaded options. ([353](WordPress/performance#353))

= 1.4.0 =

**Enhancements**

* Images: Enhance JS replacement mechanism for WebP to JPEG to more reliably replace full file name. ([443](WordPress/performance#443))
* Images: Introduce `webp_uploads_get_content_image_mimes()` to get content image MIME replacement rules. ([420](WordPress/performance#420))
* Infrastructure: Add `PERFLAB_PLUGIN_DIR_PATH` constant for `plugin_dir_path()`. ([429](WordPress/performance#429))
* Infrastructure: Rename Site Health check modules for language and consistency. ([423](WordPress/performance#423))

**Bug Fixes**

* Site Health: Fix incorrect usage of badge colors in all Site Health checks. ([472](WordPress/performance#472))
* Images: Add the original image's extension to the WebP file name to ensure it is unique. ([444](WordPress/performance#444))
* Images: Fix REST API support for plain permalinks. ([457](WordPress/performance#457))
* Infrastructure: Remove plugin option network-wide for Multisite during uninstall. ([458](WordPress/performance#458))

= 1.3.0 =

**Enhancements**

* Images: Add replacing of images only in frontend context. ([424](WordPress/performance#424))
* Images: Allow control for which image sizes to generate additional MIME type versions. ([415](WordPress/performance#415))
* Images: Discard WebP image if it is larger than corresponding JPEG image. ([418](WordPress/performance#418))
* Images: Optimize computing dominant color and transparency for images by combining the two functions. ([381](WordPress/performance#381))
* Images: Provide fallback JPEG images in frontend when WebP is not supported by the browser. ([360](WordPress/performance#360))
* Images: Rely on `wp_get_image_editor()` methods argument to check whether it supports dominant color methods. ([404](WordPress/performance#404))
* Images: Remove experimental label from Dominant Color module and turn on by default for new installs. ([425](WordPress/performance#425))
* Site Health: Remove `perflab_aea_get_resource_file_size()` in favor of `wp_filesize()`. ([380](WordPress/performance#380))
* Site Health: Update documentation link for autoloaded options. ([408](WordPress/performance#408))
* Infrastructure: Implement mechanism to not load module if core version is available. ([390](WordPress/performance#390))

**Bug Fixes**

* Images: Ensure incorrect usage of `webp_uploads_upload_image_mime_transforms` filter is treated correctly. ([393](WordPress/performance#393))
* Images: Fix PHP notice and bug in logic for when `webp_uploads_prefer_smaller_image_file` filter is set to `true`. ([397](WordPress/performance#397))
* Images: Fix an infinite loop in the WebP fallback mechanism. ([433](WordPress/performance#433))
* Images: Fix dominant color upload process to not override potential third-party editors. ([401](WordPress/performance#401))
* Images: Remove additional image backup sources & sizes files when attachment deleted. ([411](WordPress/performance#411))
* Infrastructure: Avoid including .husky directory in plugin ZIP. ([421](WordPress/performance#421))
* Infrastructure: Do not show admin pointer in multisite Network Admin. ([394](WordPress/performance#394))

= 1.2.0 =

**Features**

* Images: Add Dominant Color module to provide color background for loading images. ([282](WordPress/performance#282))
* Site Health: Add Site Health check for Full Page Cache usage. ([263](WordPress/performance#263))

**Enhancements**

* Images: Update `webp_uploads_pre_generate_additional_image_source` filter to allow returning file size. ([334](WordPress/performance#334))
* Infrastructure: Introduce plugin uninstaller routine. ([345](WordPress/performance#345))
* Infrastructure: Use `wp_filesize` instead of `filesize` if available. ([376](WordPress/performance#376))

**Bug Fixes**

* Images: Avoid overwriting existing WebP files when creating WebP images. ([359](WordPress/performance#359))
* Images: Back up edited `full` image sources when restoring the original image. ([314](WordPress/performance#314))

= 1.1.0 =

**Features**

* Infrastructure: Add Performance Lab generator meta tag to `wp_head` output. ([322](WordPress/performance#322))

**Enhancements**

* Images: Introduce filter `webp_uploads_pre_generate_additional_image_source` to short-circuit generating additional image sources on upload. ([318](WordPress/performance#318))
* Images: Introduce filter `webp_uploads_pre_replace_additional_image_source` to short-circuit replacing additional image sources in frontend content. ([319](WordPress/performance#319))
* Images: Refine logic to select smaller image file in the frontend based on `webp_uploads_prefer_smaller_image_file` filter. ([302](WordPress/performance#302))
* Images: Replace the featured image with WebP version when available. ([316](WordPress/performance#316))
* Site Health: Update Site Health Autoloaded options documentation link. ([313](WordPress/performance#313))
* Infrastructure: Avoid unnecessarily early escape of Site Health check labels. ([332](WordPress/performance#332))

**Bug Fixes**

* Object Cache: Correct label for persistent object cache Site Health check. ([329](WordPress/performance#329))
* Images: Only update the specified target images when an image is edited. ([301](WordPress/performance#301))

= 1.0.0 =

**Features**

* Images: Generate secondary image MIME types when editing original image. ([235](WordPress/performance#235))

**Enhancements**

* Images: Introduce `webp_uploads_prefer_smaller_image_file` filter allowing to opt in to preferring the smaller image file. ([287](WordPress/performance#287))
* Images: Select MIME type to use in frontend content based on file size. ([243](WordPress/performance#243))
* Site Health: Update Site Health reports copy for more clarity and consistency. ([272](WordPress/performance#272))

**Documentation**

* Infrastructure: Define the plugin's version support and backward compatibility policy. ([240](WordPress/performance#240))

= 1.0.0-rc.1 =

**Enhancements**

* Images: Change expected order of items in the `webp_uploads_content_image_mimes` filter. ([250](WordPress/performance#250))
* Images: Replace images in frontend content without using an additional regular expression. ([262](WordPress/performance#262))
* Images: Restore and backup image sizes alongside the sources properties. ([242](WordPress/performance#242))

**Bug Fixes**

* Images: Select image editor based on WebP support instead of always using the default one. ([259](WordPress/performance#259))

= 1.0.0-beta.3 =

**Bug Fixes**

* Infrastructure: Ensure default modules are loaded regardless of setting registration. ([248](WordPress/performance#248))

= 1.0.0-beta.2 =

**Features**

* Images: Create additional MIME types for the full size image. ([194](WordPress/performance#194))
* Site Health: Add module to warn about excessive amount of autoloaded options. ([124](WordPress/performance#124))

**Enhancements**

* Images: Adds sources information to the attachment media details of the REST response. ([224](WordPress/performance#224))
* Images: Allow developers to select which image format to use for images in the content. ([230](WordPress/performance#230))
* Images: Allow developers to tweak which image formats to generate on upload. ([227](WordPress/performance#227))
* Images: Replace the full size image in `the_content` with additional MIME type if available. ([195](WordPress/performance#195))
* Object Cache: Include `memcached` extension in checks for object cache support. ([206](WordPress/performance#206))
* Infrastructure: Add plugin banner and icon assets. ([231](WordPress/performance#231))
* Infrastructure: Use `.gitattributes` instead of `.distignore` to better support ZIP creation. ([223](WordPress/performance#223))

**Bug Fixes**

* Images: Use `original` image to generate all additional image format sub-sizes. ([207](WordPress/performance#207))
* Infrastructure: Replace unreliable activation hook with default value for enabled modules. ([222](WordPress/performance#222))

**Documentation**

* Infrastructure: Update release instructions to include proper branching strategy and protect release branches. ([221](WordPress/performance#221))

= 1.0.0-beta.1 =

**Features**

* Images: Add WebP for uploads module. ([32](WordPress/performance#32))
* Images: Support retry mechanism for generating sub-sizes in additional MIME types on constrained environments. ([188](WordPress/performance#188))
* Images: Update `the_content` with the appropriate image format. ([152](WordPress/performance#152))
* Site Health: Add WebP support in site health. ([141](WordPress/performance#141))
* Site Health: Add module to alert about excessive JS and CSS assets. ([54](WordPress/performance#54))
* Object Cache: Add Site Health check module for persistent object cache. ([111](WordPress/performance#111))
* Infrastructure: Add settings screen to toggle modules. ([30](WordPress/performance#30))
* Infrastructure: Added admin pointer. ([199](WordPress/performance#199))

**Enhancements**

* Object Cache: Always recommend object cache on multisite. ([200](WordPress/performance#200))
* Images: Create image sub-sizes in additional MIME types using `sources` for storage. ([147](WordPress/performance#147))
* Images: Update module directories to be within their focus directory. ([58](WordPress/performance#58))
* Site Health: Enhance detection of enqueued frontend assets. ([136](WordPress/performance#136))
* Infrastructure: Add link to Settings screen to the plugin's entry in plugins list table. ([197](WordPress/performance#197))
* Infrastructure: Enable all non-experimental modules on plugin activation. ([191](WordPress/performance#191))
* Infrastructure: Include generated module-i18n.php file in repository. ([196](WordPress/performance#196))
* Infrastructure: Introduce `perflab_active_modules` filter to control which modules are active. ([87](WordPress/performance#87))
* Infrastructure: Remove unnecessary question marks from checkbox labels. ([110](WordPress/performance#110))
* Infrastructure: Rename `object-caching` to `object-cache`. ([108](WordPress/performance#108))

**Bug Fixes**

* Images: Ensure the `-scaled` image remains in the original uploaded format. ([143](WordPress/performance#143))
* Images: Fix typo to access to the correct image properties. ([203](WordPress/performance#203))
* Infrastructure: Ensure that module header fields can be translated. ([60](WordPress/performance#60))

**Documentation**

* Site Health: Mark Site Health Audit Enqueued Assets module as experimental for now. ([205](WordPress/performance#205))
* Infrastructure: Add `readme.txt` and related update script. ([72](WordPress/performance#72))
* Infrastructure: Add changelog generator script. ([51](WordPress/performance#51))
* Infrastructure: Add contribution documentation. ([47](WordPress/performance#47))
* Infrastructure: Add release documentation. ([138](WordPress/performance#138))
* Infrastructure: Define module specification in documentation. ([26](WordPress/performance#26))

== Upgrade Notice ==

= 2.5.0 =

The SQLite module is no longer present starting with this release. If you still use it, please migrate to the standalone plugin before updating.

About

Version 2.6 with "Dominant Color" bug revised so it doesn't add background color to transparent images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages