84% lsd-lazy-load-images

Code Review | LSD Lazy load images

WordPress plugin LSD Lazy load images scored84%from 54 tests.

About plugin

  • Plugin page: lsd-lazy-load-images
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2014
  • Latest release: Jul 26, 2014
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: BasMatthee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /909 total downloads

Benchmarks

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.01MB] [CPU: ▼4.38ms] Passed 4 tests

This is a short check of server-side resources used by LSD Lazy load images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0952.36 ▲8.23
Dashboard /wp-admin3.36 ▲0.0153.55 ▲2.21
Posts /wp-admin/edit.php3.41 ▲0.0152.47 ▼2.68
Add New Post /wp-admin/post-new.php5.94 ▲0.0189.71 ▼19.08
Media Library /wp-admin/upload.php3.28 ▲0.0143.22 ▲2.03

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for LSD Lazy load images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲23213.50 ▼0.6918.92 ▲17.0445.97 ▲6.81
Dashboard /wp-admin2,198 ▲185.64 ▲0.0197.91 ▲6.4445.35 ▲0.21
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0535.48 ▼3.0635.81 ▲1.93
Add New Post /wp-admin/post-new.php1,526 ▼223.18 ▲0.10643.22 ▼42.3554.29 ▼1.22
Media Library /wp-admin/upload.php1,397 ▼34.35 ▲0.1698.64 ▼18.1043.23 ▼7.40

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lsd-lazy-load-images/lsd-lazy-load-images.php:11

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: delayed load, optimize, save bandwith, images, fade images...

lsd-lazy-load-images/lsd-lazy-load-images.php Passed 13 tests

The main PHP file in "LSD Lazy load images" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
97 characters long description:
Delay loading of images until they are in the visible area of a page to save bandwith/gain speed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected37 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP124835
JavaScript1012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 are no PNG files in this plugin