84% wp-images-lazy-loading

Code Review | WP images lazy loading

WordPress plugin WP images lazy loading scored84%from 54 tests.

About plugin

  • Plugin page: wp-images-lazy-lo...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.5.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2013
  • Latest release: May 5, 2016
  • Number of updates: 30
  • Update frequency: every 32.2 days
  • Top authors: Petrichorpost (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /13,682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.38ms] Passed 4 tests

Server-side resources used by WP images lazy loading
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.16 ▼5.83
Dashboard /wp-admin3.32 ▲0.0244.84 ▼4.35
Posts /wp-admin/edit.php3.37 ▲0.0151.98 ▲5.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.23 ▼1.54
Media Library /wp-admin/upload.php3.25 ▲0.0132.41 ▼1.80

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

WP images lazy loading: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲13813.54 ▼0.845.19 ▲3.3340.57 ▼3.38
Dashboard /wp-admin2,203 ▲154.89 ▼0.92108.56 ▼9.0641.96 ▼0.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0240.02 ▲3.8033.90 ▲1.66
Add New Post /wp-admin/post-new.php1,530 ▲1623.14 ▲5.53622.68 ▼55.5953.90 ▲2.12
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.1195.15 ▼17.5439.81 ▼3.97

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
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-images-lazy-loading/wp_images_lazy_loading.php:16

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: images, save bandwidth, jquery lazy load plugin, optimize wordpress, optimize...

wp-images-lazy-loading/wp_images_lazy_loading.php 92% from 13 tests

The entry point to "WP images lazy loading" version 1.3.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-images-lazy-loading.php" instead of "wp_images_lazy_loading.php")

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
Good job! No executable or dangerous file extensions detected224 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23935170
PHP1161554

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin