10% images-asynchronous-load

Code Review | Images Asynchronous Load

WordPress plugin Images Asynchronous Load scored10%from 54 tests.

About plugin

  • Plugin page: images-asynchrono...
  • Plugin version: 1.06
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Jun 29, 2019
  • Latest release: Jul 31, 2022
  • Number of updates: 32
  • Update frequency: every 35.3 days
  • Top authors: ttodua (75%)puvoxsoftware (28.13%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /993 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Error in wp-content/plugins/images-asynchronous-load/library_wp.php+2677
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/images-asynchronous-load/library_wp.php:2677
    Stack trace:
    #0 wp-content/plugins/images-asynchronous-load/library_wp.php(2611): Puvox\wp_plugin->is_not_bulk_activation()
    #1 wp-includes/class-wp-hook.php(312): Puvox\wp_plugin->Puvox\{closure}()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲2.16MB] [CPU: ▲6.27ms] Passed 4 tests

Server-side resources used by Images Asynchronous Load
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.68 ▲2.2255.81 ▲17.41
Dashboard /wp-admin5.51 ▲2.1663.48 ▲5.80
Posts /wp-admin/edit.php5.56 ▲2.2057.12 ▲9.88
Add New Post /wp-admin/post-new.php8.03 ▲2.1494.24 ▼8.00
Media Library /wp-admin/upload.php5.37 ▲2.1450.95 ▲19.75
Images asynchronous load /wp-admin/options-general.php?page=images-asynchronous-load5.3449.12

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_images_asynchronous_load__errors_log
New WordPress options
images-asynchronous-load
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Images Asynchronous Load: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.27 ▼0.082.40 ▲0.8142.24 ▲2.07
Dashboard /wp-admin2,202 ▲285.63 ▲0.0895.64 ▲7.0042.50 ▼1.86
Posts /wp-admin/edit.php2,107 ▲101.97 ▼0.0435.41 ▲0.3334.01 ▼5.73
Add New Post /wp-admin/post-new.php1,537 ▲1123.04 ▼0.53637.90 ▼34.5863.88 ▲8.59
Media Library /wp-admin/upload.php1,404 ▲104.21 ▼0.0293.49 ▼3.9042.31 ▲0.56
Images asynchronous load /wp-admin/options-general.php?page=images-asynchronous-load9662.1333.2457.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_images_asynchronous_load__errors_log
  • Zombie WordPress options detected upon uninstall: 7 options
    • images-asynchronous-load
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/images-asynchronous-load/library_wp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

images-asynchronous-load/index.php 85% from 13 tests

The primary PHP file in "Images Asynchronous Load" version 1.06 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("images-asynchronous-load.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 466 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin3,552 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,2505,0933,537
JavaScript111315

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity345.40
▷ Minimum class complexity4.00
▷ Maximum class complexity1,076.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods850
▷ Static methods10212.00%
▷ Public methods84399.18%
▷ Protected methods00.00%
▷ Private methods70.82%
Functions89
▷ Named functions00.00%
▷ Anonymous functions89100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected