84% wpc-coupon-listing

Code Review | WPC Coupon Listing for WooCommerce

WordPress plugin WPC Coupon Listing for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wpc-coupon-listing
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Sep 25, 2023
  • Number of updates: 20
  • Update frequency: every 19.8 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.87ms] Passed 4 tests

An overview of server-side resources used by WPC Coupon Listing for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.48 ▲1.92
Dashboard /wp-admin3.39 ▲0.0445.06 ▼14.31
Posts /wp-admin/edit.php3.50 ▲0.1449.39 ▲0.81
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.60 ▼15.89
Media Library /wp-admin/upload.php3.31 ▲0.0836.75 ▲2.60
About /wp-admin/admin.php?page=wpclever3.2730.16
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.2729.95

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Coupon Listing for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲13113.27 ▼1.131.64 ▼0.1640.73 ▼3.31
Dashboard /wp-admin2,286 ▲984.90 ▼0.03108.43 ▲1.8780.85 ▲38.91
Posts /wp-admin/edit.php2,172 ▲802.02 ▲0.0338.70 ▼2.3833.53 ▼0.57
Add New Post /wp-admin/post-new.php1,598 ▲7923.04 ▼0.38786.67 ▲186.7460.38 ▲13.79
Media Library /wp-admin/upload.php1,465 ▲774.15 ▼0.02103.69 ▲4.5644.29 ▲1.55
About /wp-admin/admin.php?page=wpclever1,3932.1528.9238.19
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7232.1735.1561.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpc-coupon-listing/wpc-coupon-listing.php:19

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

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

"WPC Coupon Listing for WooCommerce" version 1.1.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
106 characters long description:
WPC Coupon Listing will display coupons in a list on the cart and checkout page for the buyer easy to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin8,327 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript99485306,264
PHP7167381,160
CSS513442675
Sass1301188
SVG30040

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.57
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods510.64%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants8
▷ Global constants8100.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
No PNG files were detected