83% medias-toolbox

Code Review | Medias ToolBox

WordPress plugin Medias ToolBox scored83%from 54 tests.

About plugin

  • Plugin page: medias-toolbox
  • Plugin version: 1.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2019
  • Latest release: Sep 8, 2023
  • Number of updates: 130
  • Update frequency: every 11.7 days
  • Top authors: neoslab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.28ms] Passed 4 tests

An overview of server-side resources used by Medias ToolBox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.87 ▲0.09
Dashboard /wp-admin3.40 ▲0.0544.62 ▼14.70
Posts /wp-admin/edit.php3.51 ▲0.1543.72 ▼2.31
Add New Post /wp-admin/post-new.php5.98 ▲0.0979.63 ▼12.77
Media Library /wp-admin/upload.php3.32 ▲0.0933.71 ▼3.33
Compressor /wp-admin/admin.php?page=medias-toolbox-compress3.3843.43
Renamer /wp-admin/admin.php?page=medias-toolbox-renamer3.3434.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 32 new files
Database: 1 new table, 8 new options
New tables
wp_medias
New WordPress options
db_upgraded
theysaidso_admin_options
_medias_toolbox_renamer
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
_medias_toolbox_cleanup

Browser metrics Passed 4 tests

This is an overview of browser requirements for Medias ToolBox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.17 ▼0.371.81 ▼0.2045.39 ▲5.83
Dashboard /wp-admin2,219 ▲425.51 ▼0.0684.74 ▼3.4937.94 ▼8.37
Posts /wp-admin/edit.php2,127 ▲271.96 ▼0.0533.98 ▲0.1335.59 ▼17.53
Add New Post /wp-admin/post-new.php1,548 ▲1123.48 ▲5.27675.80 ▲42.3951.31 ▼11.12
Media Library /wp-admin/upload.php1,427 ▲274.17 ▲0.0792.91 ▼20.9643.62 ▼5.06
Compressor /wp-admin/admin.php?page=medias-toolbox-compress1,0252.0424.1749.62
Renamer /wp-admin/admin.php?page=medias-toolbox-renamer1,2911.6925.1749.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, 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 shallow check that no server-side errors were triggered
Everything seems fine, however 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 fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/medias-toolbox/admin/class-medias-toolbox-table.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/medias-toolbox/admin/partials/medias-toolbox-admin-compress.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/medias-toolbox/admin/partials/medias-toolbox-admin-renamer.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Table showing all the pictures and them status (Compressed or not yet)), #2 (A screenshot of the code source of a minified page.A general view of the plugin "options" page.)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

medias-toolbox/medias-toolbox.php 92% from 13 tests

The main PHP file in "Medias ToolBox" ver. 1.7.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,728 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12158551965
CSS311844737
JavaScript21026

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.57
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods53
▷ Static methods23.77%
▷ Public methods3769.81%
▷ Protected methods00.00%
▷ Private methods1630.19%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.57MB with 0.33MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png309.51KB128.12KB▼ 58.60%
screenshot-1.png270.41KB109.67KB▼ 59.44%