94% woocommerce-auto-category-thumbnails

Code Review | WooCommerce Auto Category Thumbnails

WordPress plugin WooCommerce Auto Category Thumbnails scored 94% from 54 tests.

About plugin

  • Plugin page: woocommerce-auto-...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 5.8.1
  • First release: Jun 19, 2015
  • Latest release: Jun 7, 2018
  • Number of updates: 8
  • Update frequency: every 135.5 days
  • Top authors: Shellbot (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

2,000+ active / 15,111 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼111.37ms] Passed 4 tests

Server-side resources used by WooCommerce Auto Category Thumbnails
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0146.18 ▲14.48
Dashboard /wp-admin3.07 ▲0.0160.42 ▲19.55
Posts /wp-admin/edit.php3.12 ▲0.0165.23 ▲21.42
Add New Post /wp-admin/post-new.php5.43 ▼0.00152.26 ▼499.47
Media Library /wp-admin/upload.php3.01 ▲0.0151.54 ▲19.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Auto Category Thumbnails
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.76 ▲0.1610.90 ▲2.5457.73 ▲13.31
Dashboard /wp-admin2,967 ▲335.93 ▲0.01179.34 ▲37.13141.39 ▲30.03
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0194.23 ▲30.13109.89 ▲17.31
Add New Post /wp-admin/post-new.php1,581 ▲8317.46 ▼1.37526.48 ▲168.69139.93 ▲29.68
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.02217.79 ▲64.44163.57 ▲45.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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
Everything seems fine, however this is by no means 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-auto-category-thumbnails/woocommerce-auto-cat-thumbnails.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: e-commerce, shopping, ecommerce, categories, woocommerce...

woocommerce-auto-category-thumbnails/woocommerce-auto-cat-thumbnails.php 92% from 13 tests

The main file in "WooCommerce Auto Category Thumbnails" v. 1.2.1 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-auto-category-thumbnails.php" instead of "woocommerce-auto-cat-thumbnails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected89 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1226789

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
There were not PNG files found in your plugin