89% woocommerce-product-type-column

Code Review | WooCommerce Product Type Column

WordPress plugin WooCommerce Product Type Column scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Apr 27, 2018
  • Latest release: Aug 11, 2020
  • Number of updates: 8
  • Update frequency: every 115.6 days
  • Top authors: claudiosanches (87.5%)Kloon (25%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,297 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WooCommerce Product Type Column
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.11 ▼6.62
Dashboard /wp-admin3.31 ▲0.0144.51 ▼8.02
Posts /wp-admin/edit.php3.36 ▲0.0047.72 ▲1.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.47 ▼4.25
Media Library /wp-admin/upload.php3.23 ▲0.0035.37 ▲1.49

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Product Type Column
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.081.70 ▼0.3840.76 ▼3.15
Dashboard /wp-admin2,203 ▲155.80 ▲0.91101.91 ▼14.5840.93 ▼1.69
Posts /wp-admin/edit.php2,086 ▼31.99 ▲0.0039.38 ▼0.5735.75 ▲2.12
Add New Post /wp-admin/post-new.php1,538 ▲523.39 ▲0.39694.00 ▲40.0754.34 ▼7.31
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0497.93 ▲0.0542.52 ▼1.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: woocommerce, products, admin columns

woocommerce-product-type-column/woocommerce-product-type-column.php 85% from 13 tests

The primary PHP file in "WooCommerce Product Type Column" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin155 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3268485
Sass19068
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity8.50
▷ Minimum class complexity5.00
▷ Maximum class complexity12.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin