78% list-images-to-optimize

Code Review | Wordpress List Images to Optimize

WordPress plugin Wordpress List Images to Optimize scored 78% from 54 tests.

About plugin

  • Plugin page: list-images-to-op...
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7
  • WordPress version: 6.3.1
  • First release: Feb 23, 2017
  • Latest release: Feb 23, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tincholiguori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 482 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
Install script ran successfully

Server metrics [RAM: ▼0.20MB] [CPU: ▼14.89ms] Passed 4 tests

Server-side resources used by Wordpress List Images to Optimize
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.91 ▼1.12
Dashboard /wp-admin3.10 ▼0.2128.00 ▼22.73
Posts /wp-admin/edit.php3.23 ▼0.1232.06 ▼15.43
Add New Post /wp-admin/post-new.php5.47 ▼0.4170.00 ▼16.60
Media Library /wp-admin/upload.php3.18 ▼0.0530.28 ▼4.81
settings Main /wp-admin/admin.php?page=wto_images_to_optimize_plugin_main_settings3.0825.81
Wp list of Images to Optimize /wp-admin/admin.php?page=wto_images_to_optimize_plugin_settings3.0827.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
wto_images_to_optimize_plugin_version
db_upgraded
wto_images_to_optimize_app_size
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress List Images to Optimize
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲7313.27 ▼1.111.70 ▼0.7738.12 ▼7.08
Dashboard /wp-admin2,249 ▲634.87 ▼1.0399.87 ▼6.4837.39 ▼3.99
Posts /wp-admin/edit.php2,130 ▲412.10 ▲0.0541.90 ▲0.2236.26 ▲1.08
Add New Post /wp-admin/post-new.php1,703 ▲17022.52 ▼0.77594.94 ▼77.9057.27 ▼8.86
Media Library /wp-admin/upload.php1,432 ▲504.20 ▼0.0195.18 ▼15.6047.11 ▲0.46
settings Main /wp-admin/admin.php?page=wto_images_to_optimize_plugin_main_settings8622.2529.6227.62
Wp list of Images to Optimize /wp-admin/admin.php?page=wto_images_to_optimize_plugin_settings8802.2428.3326.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wto_images_to_optimize_plugin_settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wptuts_add_color_picker' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix 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 add_action() in wp-content/plugins/list-images-to-optimize/wto_functions.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Main and Color settings), #2 (Color settings example)
The official readme.txt might help

list-images-to-optimize/plugin.php 85% from 13 tests

"Wordpress List Images to Optimize" version 1...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1...")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("list-images-to-optimize.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin9,027 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS69385,3066,631
JavaScript3491,7282,254
PHP34816142

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin