90% woocommerce-coupon-column

Code Review | WooCommerce - Coupon Column

WordPress plugin WooCommerce - Coupon Column scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-coupo...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 11, 2014
  • Latest release: Jun 25, 2021
  • Number of updates: 13
  • Update frequency: every 183.8 days
  • Top authors: pross (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,185 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WooCommerce - Coupon Column
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.76 ▼4.29
Dashboard /wp-admin3.31 ▲0.0144.64 ▼3.99
Posts /wp-admin/edit.php3.36 ▲0.0048.00 ▼1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.81 ▼2.05
Media Library /wp-admin/upload.php3.23 ▲0.0033.80 ▲1.41

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce - Coupon Column
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.43 ▲0.061.88 ▼0.2140.97 ▼7.02
Dashboard /wp-admin2,209 ▲215.87 ▲0.8298.32 ▼17.4237.01 ▼10.78
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1439.57 ▲4.5536.64 ▼1.18
Add New Post /wp-admin/post-new.php1,533 ▼023.28 ▼0.16595.86 ▼84.1250.12 ▼9.13
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0792.65 ▼6.1740.32 ▼4.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
No tags were found

woocommerce-coupon-column/woocommerce-coupon-column.php Passed 13 tests

The principal PHP file in "WooCommerce - Coupon Column" v. 0.4 is loaded by WordPress automatically on each request
87 characters long description:
Simple plugin that adds a new column into WooCommerce Orders page to show coupons used.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19951

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin