84% lazy-load-enhanced

Code Review | WordPress Lazy Load

WordPress plugin WordPress Lazy Load scored 84% from 54 tests.

About plugin

  • Plugin page: lazy-load-enhanced
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2014
  • Latest release: Feb 23, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: chiragswadia (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 5,238 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.57ms] Passed 4 tests

Analyzing server-side resources used by WordPress Lazy Load
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.75 ▼3.94
Dashboard /wp-admin3.32 ▲0.0250.56 ▲6.04
Posts /wp-admin/edit.php3.37 ▲0.0149.50 ▲2.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.90 ▼1.39
Media Library /wp-admin/upload.php3.24 ▲0.0133.75 ▲0.73

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Lazy Load
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,011 ▲27614.09 ▼0.3612.24 ▲10.3936.61 ▼7.47
Dashboard /wp-admin2,206 ▲175.90 ▲0.98105.99 ▼12.3043.04 ▼1.39
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0539.93 ▲4.4135.35 ▲2.69
Add New Post /wp-admin/post-new.php1,534 ▲123.11 ▼0.17606.23 ▼52.2362.86 ▲5.84
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0297.54 ▲3.0042.42 ▼0.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazy-load-enhanced/lazy_load.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === lazy-load-enhanced === )
The official readme.txt might help

lazy-load-enhanced/lazy_load.php 92% from 13 tests

This is the main PHP file of "WordPress Lazy Load" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lazy-load-enhanced.php" instead of "lazy_load.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 detected110 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1323774
JavaScript13033
CSS1133

PHP code Passed 2 tests

This is a very shot review of 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.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin