90% wc-coupon-listing

Code Review | Coupon Listing for WooCommerce

WordPress plugin Coupon Listing for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wc-coupon-listing
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2023
  • Latest release: Jan 26, 2023
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: yiedpozi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /212 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.05MB] [CPU: ▼1.89ms] Passed 4 tests

This is a short check of server-side resources used by Coupon Listing for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.64 ▲3.76
Dashboard /wp-admin3.35 ▲0.0446.67 ▼2.92
Posts /wp-admin/edit.php3.46 ▲0.1148.48 ▼0.03
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.30 ▼6.00
Media Library /wp-admin/upload.php3.27 ▲0.0434.76 ▲1.39

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Coupon Listing for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.58 ▼0.7210.38 ▲8.5041.08 ▼7.34
Dashboard /wp-admin2,206 ▲214.87 ▼1.01106.92 ▲4.6042.31 ▲1.16
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0139.70 ▲3.0836.94 ▲3.61
Add New Post /wp-admin/post-new.php1,542 ▼018.31 ▼0.06612.60 ▼41.8663.16 ▲13.79
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0493.66 ▼2.9139.95 ▼4.47

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
4 plugin tags: promotion, coupon, woocommerce, discount

wc-coupon-listing/wc-coupon-listing.php Passed 13 tests

"Coupon Listing for WooCommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
Display available coupons in product page.

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
There were no executable files found in this plugin399 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP79130293
CSS10082
JavaScript15024

PHP code Passed 2 tests

This is a very shot 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.27
Average class complexity3.75
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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