84% lazy-load-optimizer

Code Review | Lazy Load Optimizer

WordPress plugin Lazy Load Optimizer scored84%from 54 tests.

About plugin

  • Plugin page: lazy-load-optimizer
  • Plugin version: 1.4.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Jan 17, 2021
  • Number of updates: 68
  • Update frequency: every 11.6 days
  • Top authors: processby (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

5,000+ active /77,857 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.80ms] Passed 4 tests

Analyzing server-side resources used by Lazy Load Optimizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.93 ▼3.45
Dashboard /wp-admin3.33 ▲0.0248.56 ▼3.37
Posts /wp-admin/edit.php3.38 ▲0.0252.41 ▼1.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.41 ▼6.48
Media Library /wp-admin/upload.php3.25 ▲0.0239.23 ▲0.31
Lazy Load Optimizer /wp-admin/options-general.php?page=lazy-load-optimizer-admin3.2833.14

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
lazy_load
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Lazy Load Optimizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.75 ▲0.526.17 ▲4.3340.85 ▼4.93
Dashboard /wp-admin2,198 ▲215.51 ▼0.1185.89 ▼14.4439.93 ▼8.32
Posts /wp-admin/edit.php2,109 ▲91.98 ▲0.0035.48 ▼4.6831.46 ▼2.44
Add New Post /wp-admin/post-new.php1,531 ▲523.20 ▲0.03724.35 ▲48.3960.17 ▲3.55
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.09117.96 ▼13.2448.52 ▼7.38
Lazy Load Optimizer /wp-admin/options-general.php?page=lazy-load-optimizer-admin9541.9922.3137.00

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/lazy-load-optimizer/src/Admin/Customizer/CustomizeDonate.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/lazy-load-optimizer/src/Admin/Customizer/CustomizeLabel.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (Lazy Load Optimizer settings) image required
You can look at the official readme.txt

lazy-load-optimizer/lazy-load-optimizer.php 92% from 13 tests

Analyzing the main PHP file in "Lazy Load Optimizer" version 1.4.7
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,718 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP264443341,524
JSON31072
Markdown153070
CSS21151
JavaScript1011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods88
▷ Static methods55.68%
▷ Public methods8394.32%
▷ Protected methods00.00%
▷ Private methods55.68%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png78.92KB28.11KB▼ 64.39%