83% gazchaps-woocommerce-auto-category-product-thumbnails

Code Review | GazChap's WooCommerce Auto Category Product Thumbnails

WordPress plugin GazChap's WooCommerce Auto Category Product Thumbnails scored 83% from 54 tests.

About plugin

  • Plugin page: gazchaps-woocomme...
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2018
  • Latest release: Jun 21, 2023
  • Number of updates: 21
  • Update frequency: every 91.1 days
  • Top authors: gazchap (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active / 10,901 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.45ms] Passed 4 tests

An overview of server-side resources used by GazChap's WooCommerce Auto Category Product Thumbnails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0050.57 ▲8.12
Dashboard /wp-admin3.31 ▲0.0052.42 ▼6.98
Posts /wp-admin/edit.php3.36 ▲0.0053.24 ▲1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.45 ▼3.76
Media Library /wp-admin/upload.php3.23 ▲0.0038.82 ▲3.51

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 11 new options
New WordPress options
gazchaps-woocommerce-auto-category-product-thumbnails_use-transients
db_upgraded
theysaidso_admin_options
gazchaps-woocommerce-auto-category-product-thumbnails_category-size
gazchaps-woocommerce-auto-category-product-thumbnails_recurse
can_compress_scripts
widget_recent-comments
widget_recent-posts
gazchaps-woocommerce-auto-category-product-thumbnails_transient-expiry
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for GazChap's WooCommerce Auto Category Product Thumbnails
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼013.28 ▼1.093.05 ▲1.0941.76 ▼3.95
Dashboard /wp-admin2,206 ▲34.87 ▼0.90110.53 ▲9.2239.48 ▲0.52
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0539.19 ▲3.0534.21 ▼1.85
Add New Post /wp-admin/post-new.php1,535 ▲2122.79 ▲5.12600.31 ▲4.4063.04 ▲13.94
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.00108.04 ▲10.7045.12 ▲4.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 11 options in the database
    • can_compress_scripts
    • gazchaps-woocommerce-auto-category-product-thumbnails_transient-expiry
    • theysaidso_admin_options
    • gazchaps-woocommerce-auto-category-product-thumbnails_category-size
    • gazchaps-woocommerce-auto-category-product-thumbnails_shuffle
    • widget_recent-comments
    • gazchaps-woocommerce-auto-category-product-thumbnails_recurse
    • gazchaps-woocommerce-auto-category-product-thumbnails_use-transients
    • widget_theysaidso_widget
    • db_upgraded
    • ...

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GazChap\\add_action() in wp-content/plugins/gazchaps-woocommerce-auto-category-product-thumbnails/index.php:34

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: woocommerce, ecommerce, images, thumbnails

gazchaps-woocommerce-auto-category-product-thumbnails/index.php 77% from 13 tests

The main PHP file in "GazChap's WooCommerce Auto Category Product Thumbnails" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5.0" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gazchaps-woocommerce-auto-category-product-thumbnails.php" instead of "index.php")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

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
Everything looks great! No dangerous files found in this plugin281 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15256281

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected