83% advanced-lazy-load

Code Review | Advanced lazy load

WordPress plugin Advanced lazy load scored 83% from 54 tests.

About plugin

  • Plugin page: advanced-lazy-load
  • Plugin version: 1.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1.0
  • WordPress version: 5.9.2
  • First release: Dec 17, 2012
  • Latest release: Dec 30, 2014
  • Number of updates: 40
  • Update frequency: every 19.2 days
  • Top authors: kasonzhao (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

400+ active / 33,902 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.08MB] [CPU: ▼309.31ms] Passed 4 tests

Analyzing server-side resources used by Advanced lazy load
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.20 ▼0.326.81 ▼45.31
Dashboard /wp-admin3.45 ▲0.0464.31 ▲15.35
Posts /wp-admin/edit.php3.68 ▲0.0436.39 ▼3.39
Add New Post /wp-admin/post-new.php6.92 ▼0.06104.17 ▼1,180.53
Media Library /wp-admin/upload.php3.33 ▲0.0325.49 ▼8.01
Advanced lazy load /wp-admin/options-general.php?page=Advanced-lazy-load3.3024.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 3 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced lazy load
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲24016.30 ▲0.5818.66 ▲12.913.20 ▲0.98
Dashboard /wp-admin2,894 ▲336.14 ▼0.22119.72 ▼27.99155.53 ▼18.37
Posts /wp-admin/edit.php2,675 ▼93.26 ▲0.2269.43 ▼19.81190.21 ▲25.89
Add New Post /wp-admin/post-new.php1,664 ▼8817.10 ▼4.69443.44 ▼24.23160.48 ▲0.38
Media Library /wp-admin/upload.php1,697 ▲25.52 ▲0.04163.01 ▲18.63189.88 ▼5.99
Advanced lazy load /wp-admin/options-general.php?page=Advanced-lazy-load1,3482.3652.71128.76

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 3 options in the database
    • ifd_pixel
    • ifd_duration
    • cb_adlzylad_mobile

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 everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-lazy-load/advanced_lazyload.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots do not have images: #1 (/screenshot-1.jpg), #2 (/screenshot-2.jpg), #3 (/screenshot-3.jpg)
You can look at the official readme.txt

advanced-lazy-load/advanced_lazyload.php 85% from 13 tests

This is the main PHP file of "Advanced lazy load" version 1.6.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 183 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-lazy-load.php" instead of "advanced_lazyload.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
There were no executable files found in this plugin6,737 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity55.62
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
▷ Abstract classes27.14%
▷ Concrete classes2692.86%
▷ Final classes00.00%
▷ Static methods7515.21%
▷ Public methods38477.89%
▷ Protected methods10721.70%
▷ Private methods20.41%
▷ Named functions22100.00%
▷ Anonymous functions00.00%
▷ Global constants47.27%
▷ Class constants5192.73%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
imgs/star.png9.27KB4.68KB▼ 49.50%