89% order-categories-for-woocommerce

Code Review | Order Categories for WooCommerce

WordPress plugin Order Categories for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: order-categories-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: Jun 10, 2021
  • Number of updates: 4
  • Update frequency: every 100.3 days
  • Top authors: brightvesseldev (75%)niloybrightvessel (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by Order Categories for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.69 ▼1.31
Dashboard /wp-admin3.32 ▲0.0149.24 ▼7.50
Posts /wp-admin/edit.php3.37 ▲0.0147.88 ▼3.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.66 ▼19.92
Media Library /wp-admin/upload.php3.24 ▲0.0134.81 ▼1.59

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Order Categories for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.42 ▼0.022.08 ▲0.3044.13 ▲3.51
Dashboard /wp-admin2,192 ▲185.52 ▼0.0588.14 ▼7.8242.63 ▼0.53
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0534.74 ▼2.7038.04 ▲2.11
Add New Post /wp-admin/post-new.php1,548 ▲323.29 ▲0.09682.79 ▲5.5264.08 ▲13.64
Media Library /wp-admin/upload.php1,403 ▲94.32 ▲0.11110.89 ▲3.6747.73 ▲0.58

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 90% 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
No plugin tags provided

order-categories-for-woocommerce/main.php 77% from 13 tests

The entry point to "Order Categories for WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("order-categories-for-woocommerce.php" instead of "main.php")
  • Domain Path: The domain path points to an invalid folder, "/etc/i18n/languages/" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected649 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12113173632
JSON20017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.71
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods36.52%
▷ Public methods4597.83%
▷ Protected methods00.00%
▷ Private methods12.17%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants1
▷ Global constants1100.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