78% rocket-lazy-load

Code Review | LazyLoad Plugin – Lazy Load Images, Videos, and Iframes

WordPress plugin LazyLoad Plugin – Lazy Load Images, Videos, and Iframes scored78%from 54 tests.

About plugin

  • Plugin page: rocket-lazy-load
  • Plugin version: 2.3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jan 1, 2014
  • Latest release: Aug 14, 2023
  • Number of updates: 124
  • Update frequency: every 28.3 days
  • Top authors: wp_media (96.77%)juliobox (4.03%)

Code review

54 tests

User reviews

136 reviews

Install metrics

100,000+ active /1,285,854 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.18ms] Passed 4 tests

Server-side resources used by LazyLoad Plugin – Lazy Load Images, Videos, and Iframes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.49 ▼4.76
Dashboard /wp-admin3.42 ▲0.1246.01 ▼10.46
Posts /wp-admin/edit.php3.47 ▲0.1244.12 ▼1.51
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.89 ▲1.63
Media Library /wp-admin/upload.php3.34 ▲0.1235.01 ▲0.01
LazyLoad /wp-admin/options-general.php?page=rocket_lazyload3.3231.05

Server storage [IO: ▲0.52MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 193 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for LazyLoad Plugin – Lazy Load Images, Videos, and Iframes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.66 ▼0.981.91 ▼0.1543.77 ▼4.87
Dashboard /wp-admin2,213 ▲255.85 ▲0.9598.67 ▼7.9439.62 ▼2.37
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0536.51 ▼1.2235.10 ▲5.22
Add New Post /wp-admin/post-new.php1,545 ▲2618.18 ▼5.29627.02 ▼1.9654.97 ▼0.55
Media Library /wp-admin/upload.php1,386 ▲44.19 ▼0.0596.22 ▼2.5042.00 ▼2.97
LazyLoad /wp-admin/options-general.php?page=rocket_lazyload9982.3423.6276.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rocket-lazy-load/src/Options/Options.php
    • > /wp-content/plugins/rocket-lazy-load/src/Admin/AdminPage.php
    • > /wp-content/plugins/rocket-lazy-load/rocket-lazy-load.php
    • > /wp-content/plugins/rocket-lazy-load/views/admin-page.php
    • > /wp-content/plugins/rocket-lazy-load/src/Subscriber/ImagifyNoticeSubscriber.php
    • > /wp-content/plugins/rocket-lazy-load/src/EventManagement/EventManager.php
    • > /wp-content/plugins/rocket-lazy-load/views/imagify-notice.php
    • > /wp-content/plugins/rocket-lazy-load/src/rocket-lazyload-requirements-check.php
    • > /wp-content/plugins/rocket-lazy-load/main.php
  • 130× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\ContainerInterface' not found in wp-content/plugins/rocket-lazy-load/src/Dependencies/Interop/Container/ContainerInterface.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerAwareInterface' not found in wp-content/plugins/rocket-lazy-load/src/Dependencies/League/Container/Inflector/InflectorAggregateInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rocket-lazy-load/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerAwareInterface' not found in wp-content/plugins/rocket-lazy-load/src/Dependencies/League/Container/Definition/DefinitionFactoryInterface.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

rocket-lazy-load/rocket-lazy-load.php 92% from 13 tests

The entry point to "LazyLoad Plugin – Lazy Load Images, Videos, and Iframes" version 2.3.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected7,808 lines of code in 184 files:
LanguageFilesBlank linesComment linesLines of code
PHP1721,3253,1385,616
JavaScript6277301,383
JSON400433
CSS14914375
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity4.17
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces21
Interfaces22
Traits3
Classes136
▷ Abstract classes53.68%
▷ Concrete classes13196.32%
▷ Final classes00.00%
Methods352
▷ Static methods185.11%
▷ Public methods27377.56%
▷ Protected methods3610.23%
▷ Private methods4312.22%
Functions12
▷ Named functions325.00%
▷ Anonymous functions975.00%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/youtube.png0.65KB1.07KB0.00%
assets/img/wprocket@2x.png14.79KB8.51KB▼ 42.42%
assets/img/logo-imagify.png7.08KB7.78KB0.00%
assets/img/logo.png8.53KB5.80KB▼ 32.07%
assets/img/wprocket.png6.78KB4.43KB▼ 34.66%