84% woocommerce-custom-coupon-message

Code Review | Woocommerce Custom Coupon Message

WordPress plugin Woocommerce Custom Coupon Message scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-custo...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2013
  • Latest release: Mar 31, 2013
  • Number of updates: 38
  • Update frequency: every 1.2 days
  • Top authors: come-back-home (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,174 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Woocommerce Custom Coupon Message
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.00 ▼0.62
Dashboard /wp-admin3.31 ▼0.0347.03 ▼14.13
Posts /wp-admin/edit.php3.36 ▲0.0146.12 ▼3.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.17 ▼26.94
Media Library /wp-admin/upload.php3.23 ▲0.0031.78 ▼4.09

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Custom Coupon Message
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.23 ▲0.171.72 ▼0.0646.20 ▲6.76
Dashboard /wp-admin2,195 ▲275.55 ▲0.0282.89 ▼1.6039.97 ▼5.92
Posts /wp-admin/edit.php2,100 ▲212.03 ▲0.0334.20 ▼4.2135.09 ▼3.19
Add New Post /wp-admin/post-new.php1,526 ▼523.23 ▼0.01590.12 ▼86.6448.47 ▼9.53
Media Library /wp-admin/upload.php1,400 ▼04.17 ▲0.0395.58 ▼11.9240.71 ▼6.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-custom-coupon-message/woocommerce-custom-coupon-message.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
2 plugin tags: woocommerce, coupons

woocommerce-custom-coupon-message/woocommerce-custom-coupon-message.php 92% from 13 tests

The main PHP script in "Woocommerce Custom Coupon Message" version 0.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin380 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP118073329
PO File1171951

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin