78% lazy-loading-responsive-images

Code Review | Lazy Loader

WordPress plugin Lazy Loader scored78%from 54 tests.

About plugin

  • Plugin page: lazy-loading-resp...
  • Plugin version: 8.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2015
  • Latest release: Jan 4, 2023
  • Number of updates: 79
  • Update frequency: every 32.8 days
  • Top authors: FlorianBrinkmann (73.42%)MarcDK (27.85%)

Code review

54 tests

User reviews

48 reviews

Install metrics

10,000+ active /186,057 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▲3.05ms] Passed 4 tests

An overview of server-side resources used by Lazy Loader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8143.85 ▲8.29
Dashboard /wp-admin3.72 ▲0.4149.53 ▲3.54
Posts /wp-admin/edit.php3.77 ▲0.4150.04 ▲4.34
Add New Post /wp-admin/post-new.php6.24 ▲0.3588.22 ▼1.83
Media Library /wp-admin/upload.php3.58 ▲0.3541.05 ▲6.13

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Lazy Loader
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.40 ▼0.135.34 ▲3.6937.75 ▼6.82
Dashboard /wp-admin2,198 ▲185.51 ▼0.0883.07 ▼8.8471.88 ▲30.61
Posts /wp-admin/edit.php2,100 ▲31.97 ▲0.0236.21 ▼1.9232.02 ▼3.27
Add New Post /wp-admin/post-new.php1,527 ▼123.15 ▲0.17702.62 ▲38.5063.66 ▲9.03
Media Library /wp-admin/upload.php1,394 ▼64.23 ▼0.0098.60 ▲0.9173.13 ▲28.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lazy-loading-responsive-images/vendor/masterminds/html5/bin/entities.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Serializer\\RulesInterface' not found in wp-content/plugins/lazy-loading-responsive-images/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\InputStream' not found in wp-content/plugins/lazy-loading-responsive-images/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Parser\\StringInputStream' not found in wp-content/plugins/lazy-loading-responsive-images/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\EventHandler' not found in wp-content/plugins/lazy-loading-responsive-images/vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: performance, lazy loading, images, lazysizes

lazy-loading-responsive-images/lazy-load-responsive-images.php 85% from 13 tests

"Lazy Loader" version 8.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 210 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lazy-loading-responsive-images.php" instead of "lazy-load-responsive-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected8,191 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP361,0452,9687,987
Markdown2470122
JSON10078
JavaScript4334

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.44
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces7
Interfaces4
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods271
▷ Static methods3512.92%
▷ Public methods21780.07%
▷ Protected methods4717.34%
▷ Private methods72.58%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants60
▷ Global constants00.00%
▷ Class constants60100.00%
▷ Public constants60100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected