10% image-size-manager

Code Review | Image Size Manager

WordPress plugin Image Size Managerscored10%from 54 tests.

About plugin

  • Plugin page: image-size-manager
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: Jan 3, 2020
  • Number of updates: 6
  • Update frequency: every 2.5 days
  • Top authors: codecide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,268 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/image-size-manager/imgsize.php+34
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.72ms] Passed 4 tests

Analyzing server-side resources used by Image Size Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.375.56 ▼35.50
Dashboard /wp-admin2.12 ▼1.197.88 ▼42.18
Posts /wp-admin/edit.php2.12 ▼1.246.89 ▼45.86
Add New Post /wp-admin/post-new.php2.12 ▼3.776.80 ▼95.34
Media Library /wp-admin/upload.php2.12 ▼1.116.33 ▼30.23

Server storage [IO: ▲0.02MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Image Size Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.18 ▼0.352.16 ▲0.5643.84 ▲0.39
Dashboard /wp-admin2,215 ▲385.60 ▼0.0091.52 ▼1.0740.60 ▲0.77
Posts /wp-admin/edit.php2,123 ▲202.01 ▲0.0434.86 ▼3.6534.23 ▼2.77
Add New Post /wp-admin/post-new.php1,543 ▲1522.93 ▼0.21665.55 ▼0.0255.02 ▼3.87
Media Library /wp-admin/upload.php1,423 ▲204.19 ▼0.0197.94 ▼9.8544.95 ▲1.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/image-size-manager/imgsize.php+34
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Image Size Manager=== )
You can look at the official readme.txt

image-size-manager/imgsize.php 92% from 13 tests

The main file in "Image Size Manager" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-size-manager.php" instead of "imgsize.php")

Code Analysis Passed 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 plugin291 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23176234
CSS14129
JavaScript11028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin