84% lazy-images-without-jetpack

Code Review | Lazy Images Without Jetpack

WordPress plugin Lazy Images Without Jetpack scored84%from 54 tests.

About plugin

  • Plugin page: lazy-images-witho...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: Aug 8, 2020
  • Number of updates: 7
  • Update frequency: every 32.9 days
  • Top authors: nicokaiser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /582 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Lazy Images Without Jetpack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.89 ▼1.62
Dashboard /wp-admin3.31 ▼0.0445.98 ▼16.32
Posts /wp-admin/edit.php3.36 ▲0.0044.96 ▼2.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.23 ▼20.90
Media Library /wp-admin/upload.php3.23 ▲0.0034.27 ▲1.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Lazy Images Without Jetpack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.33 ▼0.022.24 ▲0.4743.81 ▲4.33
Dashboard /wp-admin2,189 ▲125.50 ▼0.1685.62 ▼3.7444.62 ▲7.61
Posts /wp-admin/edit.php2,097 ▼02.01 ▲0.0437.27 ▲0.1935.54 ▲0.87
Add New Post /wp-admin/post-new.php1,526 ▼023.27 ▼0.13674.85 ▲4.5755.17 ▼0.50
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.01101.05 ▲0.0945.19 ▼2.20

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 | 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lazy-images-without-jetpack/lazy-images-without-jetpack.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

lazy-images-without-jetpack/lazy-images-without-jetpack.php 92% from 13 tests

The main PHP script in "Lazy Images Without Jetpack" version 1.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 225 characters long)

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
Success! There were no dangerous files found in this plugin653 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1139278464
PHP254179183
Markdown1506

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods746.67%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin