78% bulk-image-resizer

Code Review | Bulk images: Resize, optimize, webp, rename

WordPress plugin Bulk images: Resize, optimize, webp, rename scored78%from 54 tests.

About plugin

  • Plugin page: bulk-image-resizer
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 66
  • Update frequency: every 13.1 days
  • Top authors: giuliopanda (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /11,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.42MB] [CPU: ▼0.71ms] Passed 4 tests

Server-side resources used by Bulk images: Resize, optimize, webp, rename
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4241.45 ▲2.18
Dashboard /wp-admin3.78 ▲0.4348.33 ▼12.45
Posts /wp-admin/edit.php3.83 ▲0.4750.73 ▲6.07
Add New Post /wp-admin/post-new.php6.30 ▲0.4186.52 ▲3.78
Media Library /wp-admin/upload.php3.64 ▲0.4139.78 ▲3.65
Bulk images /wp-admin/tools.php?page=bulk-images3.7039.72

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bulk images: Resize, optimize, webp, rename
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5814.29 ▼0.321.74 ▲0.1536.88 ▼1.78
Dashboard /wp-admin2,196 ▲225.54 ▼0.0380.81 ▼3.8239.17 ▼2.71
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0732.90 ▼2.7233.75 ▼2.85
Add New Post /wp-admin/post-new.php1,529 ▼1523.38 ▲5.22676.89 ▲23.1066.86 ▼1.75
Media Library /wp-admin/upload.php1,407 ▲104.21 ▼0.0493.21 ▼22.8544.34 ▼2.96
Bulk images /wp-admin/tools.php?page=bulk-images1,4623.2867.0550.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • bir_monthly_stats
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bulk-image-resizer/admin/template/part-stat.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bulk_image_resizer\\admin_url() in wp-content/plugins/bulk-image-resizer/admin/template/part-config.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'bulk_image_resizer\\Bir_list_functions' not found in wp-content/plugins/bulk-image-resizer/admin/template/part-bulk.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'bulk_image_resizer\\Bir_extends_functions' not found in wp-content/plugins/bulk-image-resizer/includes/class-bir-facade.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'bulk_image_resizer\\Bir_extends_functions' not found in wp-content/plugins/bulk-image-resizer/includes/class-bir-optimize-function.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'bulk_image_resizer\\Bir_extends_functions' not found in wp-content/plugins/bulk-image-resizer/includes/class-bir-list-function.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'bulk_image_resizer\\Bir_extends_functions' not found in wp-content/plugins/bulk-image-resizer/includes/class-bir-rebuild-function.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'bulk_image_resizer\\Bir_extends_functions' not found in wp-content/plugins/bulk-image-resizer/includes/class-bir-rename-function.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bulk-image-resizer/admin/template/part-doc.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: optimize, resize, pictures, webp, convert

bulk-image-resizer/bulk-image-resizer.php 92% from 13 tests

The main file in "Bulk images: Resize, optimize, webp, rename" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,973 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP222995671,993
JavaScript286107557
CSS16357423

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.93
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity6.17
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods71
▷ Static methods3954.93%
▷ Public methods6794.37%
▷ Protected methods00.00%
▷ Private methods45.63%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin