84% smart-image-loader

Code Review | Smart Image Loader

WordPress plugin Smart Image Loader scored 84% from 54 tests.

About plugin

  • Plugin page: smart-image-loader
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.3-4.9.3
  • WordPress version: 6.3.1
  • First release: Apr 22, 2014
  • Latest release: Aug 9, 2018
  • Number of updates: 83
  • Update frequency: every 19.0 days
  • Top authors: bypr.nils (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 8,296 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.27MB] [CPU: ▼1.51ms] Passed 4 tests

This is a short check of server-side resources used by Smart Image Loader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2436.41 ▼8.26
Dashboard /wp-admin3.63 ▲0.3254.55 ▲1.18
Posts /wp-admin/edit.php3.68 ▲0.3253.60 ▲0.27
Add New Post /wp-admin/post-new.php6.15 ▲0.26104.73 ▲14.33
Media Library /wp-admin/upload.php3.49 ▲0.2638.42 ▲0.78
smart-image-loader /wp-admin/admin.php?page=smart-image-loader/options.php3.4636.99

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 16 new options
New WordPress options
sil-cleanup
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
sil-loader
sil-refresh-scroll
sil-selector
can_compress_scripts
sil-fade
sil-exclude
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Image Loader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲8713.60 ▼0.817.28 ▲5.4139.23 ▼4.31
Dashboard /wp-admin2,206 ▼04.88 ▲0.0899.39 ▼14.2839.72 ▼2.87
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0436.95 ▼3.3733.50 ▼0.73
Add New Post /wp-admin/post-new.php1,533 ▼123.33 ▼0.05579.88 ▼93.3861.84 ▲5.13
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0397.43 ▼16.0342.30 ▼2.80
smart-image-loader /wp-admin/admin.php?page=smart-image-loader/options.php9112.1630.0933.18

Uninstaller [IO: ✅] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 16 options
    • sil-placeholder
    • sil-refresh-resize
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • sil-lazy-load-at
    • sil-refresh-scroll
    • widget_recent-posts
    • sil-exclude
    • sil-fade
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/smart-image-loader/options.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: speed, image, above the fold, lazy loading, performance

smart-image-loader/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Smart Image Loader" version 0.5.1
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("smart-image-loader.php" instead of "plugin.php")
  • Description: The description should be shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,822 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32522791,478
JavaScript219035344

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity164.50
▷ Minimum class complexity131.00
▷ Maximum class complexity198.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
No PNG images were found in this plugin