83% lazy-loading-images-speed-page

Code Review | Plugin Name: Lazy Loading images & speed page

WordPress plugin Plugin Name: Lazy Loading images & speed pagescored83%from 54 tests.

About plugin

  • Plugin page: lazy-loading-imag...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 6, 2022
  • Latest release: Nov 6, 2023
  • Number of updates: 20
  • Update frequency: every 21.3 days
  • Top authors: clarotm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /448 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Plugin Name: Lazy Loading images & speed page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.42 ▼1.80
Dashboard /wp-admin3.99 ▲0.6557.14 ▼8.26
Posts /wp-admin/edit.php3.38 ▲0.0243.63 ▲2.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.44 ▼19.21
Media Library /wp-admin/upload.php3.25 ▲0.0234.25 ▲0.65

Server storage [IO: ▲0.02MB] [DB: ▲0.12MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Name: Lazy Loading images & speed page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15014.34 ▼0.012.79 ▲1.1037.78 ▼6.00
Dashboard /wp-admin2,277 ▲975.63 ▼0.0789.72 ▼9.6455.80 ▲10.87
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0638.63 ▼0.5632.64 ▼2.40
Add New Post /wp-admin/post-new.php1,526 ▼1823.39 ▼1.61652.03 ▼1.6756.57 ▼10.86
Media Library /wp-admin/upload.php1,403 ▼04.16 ▼0.0098.08 ▼0.5941.23 ▼2.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.12MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lazy-loading-images-speed-page/index.php:20

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 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: Lazy Loading images & speed page=== )
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

lazy-loading-images-speed-page/index.php 92% from 13 tests

This is the main PHP file of "Plugin Name: Lazy Loading images & speed page" version 2.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("lazy-loading-images-speed-page.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected334 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25678209
PHP1183869
CSS11456

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin