83% wp-image-lazy-load

Code Review | Zedna WP Image Lazy Load

WordPress plugin Zedna WP Image Lazy Load scored83%from 54 tests.

About plugin

  • Plugin page: wp-image-lazy-load
  • Plugin version: 1.6.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2016
  • Latest release: Nov 7, 2019
  • Number of updates: 74
  • Update frequency: every 18.8 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

600+ active /24,429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲1.34ms] Passed 4 tests

Analyzing server-side resources used by Zedna WP Image Lazy Load
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.10 ▼5.05
Dashboard /wp-admin3.38 ▲0.0850.92 ▲2.65
Posts /wp-admin/edit.php3.44 ▲0.0851.24 ▲3.30
Add New Post /wp-admin/post-new.php5.96 ▲0.0898.27 ▲4.44
Media Library /wp-admin/upload.php3.31 ▲0.0841.62 ▲6.18

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 16 new options
New WordPress options
wpimagelazyload_animationduration
wpimagelazyload_skipallparent
wpimagelazyload_themefilesmofidied
wpimagelazyload_animation
wpimagelazyload_loadonposition
wpimagelazyload_skipvideo
db_upgraded
widget_theysaidso_widget
can_compress_scripts
wpimagelazyload_animationtiming
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zedna WP Image Lazy Load
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.78 ▼0.5713.15 ▲11.5546.54 ▲1.06
Dashboard /wp-admin2,213 ▲365.62 ▲0.0585.31 ▼10.5569.44 ▲27.54
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0536.03 ▼1.8935.26 ▼0.76
Add New Post /wp-admin/post-new.php1,692 ▲16422.15 ▼1.23678.93 ▼1.9248.63 ▼2.06
Media Library /wp-admin/upload.php1,409 ▲124.25 ▲0.0795.48 ▼28.8879.66 ▲27.89

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 16 options in the database
    • wpimagelazyload_loadonposition
    • can_compress_scripts
    • widget_theysaidso_widget
    • wpimagelazyload_animation
    • widget_recent-posts
    • wpimagelazyload_animationtiming
    • wpimagelazyload_skipparent
    • wpimagelazyload_phplazyload
    • db_upgraded
    • theysaidso_admin_options
    • ...

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/wp-image-lazy-load/image_lazy_load.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-image-lazy-load/image_lazy_load.php 85% from 13 tests

The main file in "Zedna WP Image Lazy Load" v. 1.6.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-image-lazy-load.php" instead of "image_lazy_load.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 254 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin677 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13542357
JavaScript11638212
PO File12729108

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No 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%
Functions11
▷ Named functions11100.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
6 PNG files occupy 0.27MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/pixels.png56.13KB23.75KB▼ 57.68%
assets/icon-128x128.png6.17KB3.26KB▼ 47.07%
assets/icon-256x256.png15.03KB6.30KB▼ 58.06%
assets/wpill-ico.png0.64KB0.81KB0.00%
assets/banner-772x250.png49.77KB13.14KB▼ 73.59%