10% image-regenerate-select-crop

Code Review | Image Regenerate & Select Crop

WordPress plugin Image Regenerate & Select Crop scored10%from 54 tests.

About plugin

  • Plugin page: image-regenerate-...
  • Plugin version: 7.3.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 19, 2014
  • Latest release: Nov 14, 2023
  • Number of updates: 156
  • Update frequency: every 21.0 days
  • Top authors: Iulia Cazan (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

10,000+ active /244,222 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+558
    mkdir(): File exists

Server metrics [RAM: ▲1.73MB] [CPU: ▲3.10ms] Passed 4 tests

Analyzing server-side resources used by Image Regenerate & Select Crop
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.33 ▲1.8655.69 ▲17.70
Dashboard /wp-admin5.17 ▲1.8365.02 ▲2.02
Posts /wp-admin/edit.php5.29 ▲1.9363.68 ▲16.63
Add New Post /wp-admin/post-new.php7.23 ▲1.3575.28 ▼23.96
Media Library /wp-admin/upload.php5.11 ▲1.8854.05 ▲22.52
Features Manager4 /wp-admin/admin.php?page=image-regenerate-select-crop-extensions5.0755.60
Advanced Rules /wp-admin/admin.php?page=image-regenerate-select-crop-rules5.0746.26
General Settings /wp-admin/admin.php?page=image-regenerate-select-crop-settings5.0854.31

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
can_compress_scripts
sirsc_version
sirsc_types_options
sirsc_db_version
widget_recent-posts
sirsc_logs_prefix
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Regenerate & Select Crop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲16914.35 ▲0.041.82 ▲0.2144.15 ▲3.38
Dashboard /wp-admin2,306 ▲1285.59 ▼0.1298.17 ▼5.5787.96 ▲45.25
Posts /wp-admin/edit.php2,236 ▲1332.13 ▲0.1834.68 ▼3.5433.91 ▼2.43
Add New Post /wp-admin/post-new.php1,795 ▲26922.06 ▼1.37727.73 ▲20.6766.54 ▲6.89
Media Library /wp-admin/upload.php1,754 ▲3634.13 ▼0.1096.77 ▼3.9085.08 ▲38.02
Features Manager4 /wp-admin/admin.php?page=image-regenerate-select-crop-extensions1,3561.6927.3461.99
Advanced Rules /wp-admin/admin.php?page=image-regenerate-select-crop-rules3,1151.7128.9360.07
General Settings /wp-admin/admin.php?page=image-regenerate-select-crop-settings2,4381.9727.8063.23

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • sirsc_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-regenerate-select-crop/inc/integration.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-regenerate-select-crop/inc/iterator.php:12
    • > PHP Warning
      Use of undefined constant SIRSC_PLUGIN_URL - assumed 'SIRSC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-regenerate-select-crop/inc/placeholder.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-regenerate-select-crop/inc/debug.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-regenerate-select-crop/inc/calls.php:12
    • > PHP Warning
      Use of undefined constant SIRSC_PLUGIN_FOLDER - assumed 'SIRSC_PLUGIN_FOLDER' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-regenerate-select-crop/inc/placeholder.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-regenerate-select-crop/inc/adons-api.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SIRSC\\Placeholder\\wp_mkdir_p() in wp-content/plugins/image-regenerate-select-crop/inc/placeholder.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-regenerate-select-crop/image-regenerate-select-crop.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-regenerate-select-crop/inc/admin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

image-regenerate-select-crop/image-regenerate-select-crop.php 85% from 13 tests

The main file in "Image Regenerate & Select Crop" v. 7.3.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 221 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin12,018 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,3282,99810,795
PO File1383472781
JavaScript6264252
CSS4341187
SVG1013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity135.12
▷ Minimum class complexity20.00
▷ Maximum class complexity592.00
Average method complexity6.85
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods183
▷ Static methods16489.62%
▷ Public methods17394.54%
▷ Protected methods00.00%
▷ Private methods105.46%
Functions168
▷ Named functions16497.62%
▷ Anonymous functions42.38%
Constants53
▷ Global constants1935.85%
▷ Class constants3464.15%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.15MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/adon-import-export-image.png26.67KB25.41KB▼ 4.74%
assets/images/icon-128x128.png28.75KB11.80KB▼ 58.94%
assets/images/buy-me-a-coffee.png19.75KB7.15KB▼ 63.78%
assets/images/adon-uploads-inspector-image.png23.90KB23.22KB▼ 2.85%
assets/images/adon-uploads-folder-info-image.png27.31KB26.86KB▼ 1.65%