84% better-image-loading

Code Review | Better Image Loading

WordPress plugin Better Image Loading scored84%from 54 tests.

About plugin

  • Plugin page: better-image-loading
  • Plugin version: 0.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Nov 12, 2018
  • Number of updates: 30
  • Update frequency: every 27.4 days
  • Top authors: moosch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,079 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.56ms] Passed 4 tests

An overview of server-side resources used by Better Image Loading
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.83 ▼6.29
Dashboard /wp-admin3.37 ▲0.0752.47 ▲2.75
Posts /wp-admin/edit.php3.42 ▲0.0754.14 ▲7.63
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.23 ▼7.85
Media Library /wp-admin/upload.php3.29 ▲0.0739.12 ▲5.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better Image Loading
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.72 ▼0.644.58 ▲2.8441.79 ▼1.98
Dashboard /wp-admin2,209 ▲215.02 ▼0.0495.38 ▼8.6339.41 ▼5.16
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0541.50 ▲1.6336.44 ▲3.95
Add New Post /wp-admin/post-new.php1,533 ▲1223.16 ▼0.18685.03 ▲16.8362.87 ▲5.14
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.0293.92 ▼8.1643.26 ▼0.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 plugins_url() in wp-content/plugins/better-image-loading/better-image-loading.php:39

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: images, loading

better-image-loading/better-image-loading.php Passed 13 tests

This is the main PHP file of "Better Image Loading" version 0.3.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
47 characters long description:
Load images better on page paint. No more jank!

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
Success! There were no dangerous files found in this plugin552 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP283202283
JavaScript44444175
Sass110255
JSON10038
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity73.00
▷ Minimum class complexity73.00
▷ Maximum class complexity73.00
Average method complexity8.20
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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