84% bulk-generate-thumbnails

Code Review | Bulk Generate Thumbnails

WordPress plugin Bulk Generate Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: bulk-generate-thu...
  • Plugin version: 2.04
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 38
  • Update frequency: every 34.5 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,725 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
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.10ms] Passed 4 tests

Server-side resources used by Bulk Generate Thumbnails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1836.33 ▼1.52
Dashboard /wp-admin3.47 ▲0.1743.77 ▼6.13
Posts /wp-admin/edit.php3.58 ▲0.2349.15 ▲2.55
Add New Post /wp-admin/post-new.php6.05 ▲0.1778.45 ▼7.24
Media Library /wp-admin/upload.php3.39 ▲0.1734.36 ▼1.49
Generate Thumbnails /wp-admin/upload.php?page=bulkgeneratethumbnails3.3734.89

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bulk Generate Thumbnails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.021.60 ▼0.3044.93 ▲0.49
Dashboard /wp-admin2,199 ▲195.62 ▲0.0390.15 ▼9.5537.84 ▼5.33
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0641.06 ▲3.7935.62 ▲0.15
Add New Post /wp-admin/post-new.php1,529 ▲12323.61 ▲5.71681.87 ▲39.0654.39 ▲2.32
Media Library /wp-admin/upload.php1,404 ▲104.17 ▼0.2096.95 ▼0.6642.34 ▲0.38
Generate Thumbnails /wp-admin/upload.php?page=bulkgeneratethumbnails1,2042.0022.9427.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-screen.php): failed to open stream: No such file or directory in wp-content/plugins/bulk-generate-thumbnails/lib/class-tt-bulkgeneratethumbnails-list-table.php on line 26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bulk-generate-thumbnails/lib/class-tt-bulkgeneratethumbnails-list-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/bulk-generate-thumbnails/lib/class-bulkgeneratethumbnails.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/bulk-generate-thumbnails/lib/class-bulkgeneratethumbnails.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-generate-thumbnails/lib/class-bulkgeneratethumbnailsadmin.php:36
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/bulk-generate-thumbnails/lib/class-tt-bulkgeneratethumbnails-list-table.php on line 26

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: media, thumbnails

bulk-generate-thumbnails/bulkgeneratethumbnails.php 92% from 13 tests

This is the main PHP file of "Bulk Generate Thumbnails" version 2.04, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bulk-generate-thumbnails.php" instead of "bulkgeneratethumbnails.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
Good job! No executable or dangerous file extensions detected1,127 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5148369922
JavaScript22342205

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity36.67
▷ Minimum class complexity26.00
▷ Maximum class complexity57.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods1967.86%
▷ Protected methods00.00%
▷ Private methods932.14%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin