90% woocommerce-user-coupon-management

Code Review | WooCommerce Coupon User Management

WordPress plugin WooCommerce Coupon User Management scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-user-...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2015
  • Latest release: May 12, 2016
  • Number of updates: 14
  • Update frequency: every 23.1 days
  • Top authors: GigaC (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,960 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WooCommerce Coupon User Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.63 ▼2.39
Dashboard /wp-admin3.32 ▲0.0145.77 ▼4.57
Posts /wp-admin/edit.php3.37 ▲0.0149.34 ▼4.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.06 ▼2.33
Media Library /wp-admin/upload.php3.24 ▲0.0136.68 ▼2.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Coupon User Management
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.41 ▲0.061.79 ▼0.2142.78 ▲1.68
Dashboard /wp-admin2,189 ▲155.59 ▲0.0292.16 ▲3.6640.53 ▼4.40
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0039.49 ▼4.8836.18 ▼8.95
Add New Post /wp-admin/post-new.php1,526 ▼022.87 ▼0.26655.27 ▼6.0753.42 ▼3.39
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.0397.21 ▼6.9643.92 ▼3.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: management, coupon, user, woocommerce

woocommerce-user-coupon-management/woo-user-coupon.php 92% from 13 tests

The main PHP file in "WooCommerce Coupon User Management" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-user-coupon-management.php" instead of "woo-user-coupon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin189 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36315189

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.23
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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