83% lazy-image-load

Code Review | Lazy Image Load

WordPress plugin Lazy Image Load scored83%from 54 tests.

About plugin

  • Plugin page: lazy-image-load
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: May 28, 2014
  • Latest release: Jun 21, 2015
  • Number of updates: 3
  • Update frequency: every 129.7 days
  • Top authors: pashabd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,712 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.31ms] Passed 4 tests

This is a short check of server-side resources used by Lazy Image Load
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.65 ▼1.95
Dashboard /wp-admin3.31 ▲0.0143.63 ▼6.25
Posts /wp-admin/edit.php3.36 ▲0.0045.35 ▼0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.62 ▼4.38
Media Library /wp-admin/upload.php3.24 ▲0.0035.79 ▼0.19

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazy Image Load
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,028 ▲29313.80 ▼0.4919.40 ▲17.3338.80 ▼8.99
Dashboard /wp-admin2,211 ▲234.87 ▼0.99110.03 ▼6.6641.36 ▼4.28
Posts /wp-admin/edit.php2,091 ▲21.97 ▼0.0740.12 ▲2.2435.48 ▲2.43
Add New Post /wp-admin/post-new.php1,530 ▼823.23 ▼0.17690.27 ▲32.2457.74 ▼8.17
Media Library /wp-admin/upload.php1,384 ▼44.21 ▲0.0898.68 ▼11.8842.39 ▼3.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 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-image-load/main-function.php:16

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Installed in demo server.)
The official readme.txt might help

lazy-image-load/main-function.php 85% from 13 tests

The main PHP script in "Lazy Image Load" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 318 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("lazy-image-load.php" instead of "main-function.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13934169
PHP115828

PHP code Passed 2 tests

A short 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.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected