83% image-sizes-controller

Code Review | Image Sizes Controller, Create Custom Image Sizes, Disable Image Sizes

WordPress plugin Image Sizes Controller, Create Custom Image Sizes, Disable Image Sizes scored83%from 54 tests.

About plugin

  • Plugin page: image-sizes-contr...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2022
  • Latest release: Aug 30, 2023
  • Number of updates: 18
  • Update frequency: every 32.7 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,419 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.69MB] [CPU: ▲1.50ms] Passed 4 tests

A check of server-side resources used by Image Sizes Controller, Create Custom Image Sizes, Disable Image Sizes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7044.73 ▲4.33
Dashboard /wp-admin4.00 ▲0.6952.29 ▼1.13
Posts /wp-admin/edit.php4.05 ▲0.6957.27 ▲7.39
Add New Post /wp-admin/post-new.php6.58 ▲0.6995.09 ▼4.60
Media Library /wp-admin/upload.php3.92 ▲0.6946.52 ▲9.26
Image Sizes Controller /wp-admin/upload.php?page=gpls-issl-images-subsizes-list4.0043.15

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Image Sizes Controller, Create Custom Image Sizes, Disable Image Sizes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.27 ▼1.084.50 ▲2.5043.61 ▼0.06
Dashboard /wp-admin2,209 ▲245.85 ▲0.81101.70 ▼7.4341.77 ▼3.89
Posts /wp-admin/edit.php2,098 ▲61.99 ▼0.0540.70 ▲3.4535.00 ▲0.25
Add New Post /wp-admin/post-new.php1,519 ▲517.38 ▼0.52676.34 ▼0.7057.91 ▼9.99
Media Library /wp-admin/upload.php1,409 ▲214.22 ▲0.10103.38 ▼5.7145.64 ▲1.08
Image Sizes Controller /wp-admin/upload.php?page=gpls-issl-images-subsizes-list3,4082.3131.1876.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/image-sizes-controller/templates/pages/bulk-subsizes-template.php on line 7
    • > PHP Fatal error
      Trait 'GPLSCore\\GPLS_PLUGIN_ISSL\\Utils' not found in wp-content/plugins/image-sizes-controller/includes/ImageSubsizes.php on line 10
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/image-sizes-controller/templates/pages/sizes-controller-template.php on line 7
    • > PHP Fatal error
      Trait 'GPLSCore\\GPLS_PLUGIN_ISSL\\Utils' not found in wp-content/plugins/image-sizes-controller/includes/ImageSizes.php on line 10
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/image-sizes-controller/templates/image-subsizes-list-template.php on line 6
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/image-sizes-controller/templates/pages/sizes-controller-template.php on line 8
    • > PHP Notice
      Undefined variable: attachment_post in wp-content/plugins/image-sizes-controller/templates/image-subsizes-list-template.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_ISSL\\ImageSizes' not found in wp-content/plugins/image-sizes-controller/templates/pages/sizes-controller-template.php:9
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/image-sizes-controller/templates/pages/bulk-subsizes-template.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GPLSCore\\GPLS_PLUGIN_ISSL\\wp_get_registered_image_subsizes() in wp-content/plugins/image-sizes-controller/templates/pages/bulk-subsizes-template.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can look at the official readme.txt

image-sizes-controller/gpls-issl-images-subsizes-list.php 92% from 13 tests

Analyzing the main PHP file in "Image Sizes Controller, Create Custom Image Sizes, Disable Image Sizes" version 1.0.8
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("image-sizes-controller.php" instead of "gpls-issl-images-subsizes-list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,189 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP244251,3143,179
CSS60106
JavaScript4064

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.54
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces6
Interfaces0
Traits3
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods159
▷ Static methods5937.11%
▷ Public methods12779.87%
▷ Protected methods2012.58%
▷ Private methods127.55%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 1.29MB with 0.91MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) includes/Core/assets/images/woo-cart-limiter.png62.93KB0.00KB▼ 100.00%
includes/Core/assets/images/wp-paypal-subscriptions.png17.91KB7.09KB▼ 60.39%
includes/Core/assets/images/woo-best-seller.png42.57KB16.47KB▼ 61.31%
includes/Core/assets/images/avif-support.png24.13KB8.56KB▼ 64.51%
includes/Core/assets/images/woo-advanced-bundles.png847.82KB291.89KB▼ 65.57%