84% custom-coupon-messages

Code Review | WooCommerce Custom Coupon Messages

WordPress plugin WooCommerce Custom Coupon Messages scored84%from 54 tests.

About plugin

  • Plugin page: custom-coupon-mes...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 11
  • Update frequency: every 40.1 days
  • Top authors: wpfixit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.88ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Custom Coupon Messages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0647.64 ▲1.71
Dashboard /wp-admin3.36 ▲0.0250.18 ▼17.28
Posts /wp-admin/edit.php3.41 ▲0.0651.67 ▼3.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.08 ▼22.21
Media Library /wp-admin/upload.php3.28 ▲0.0639.50 ▼0.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Custom Coupon Messages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.53 ▼0.111.62 ▼0.3043.48 ▲3.66
Dashboard /wp-admin2,200 ▲235.56 ▼0.1184.11 ▼14.8643.89 ▲0.46
Posts /wp-admin/edit.php2,108 ▲52.02 ▼0.0140.37 ▲0.0434.72 ▼2.13
Add New Post /wp-admin/post-new.php1,539 ▲1323.18 ▼0.43746.12 ▲71.4954.82 ▼2.12
Media Library /wp-admin/upload.php1,405 ▲24.20 ▼0.08110.91 ▲6.4648.98 ▲5.70

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/custom-coupon-messages/custom-coupon-messages.php:31

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: woocommerce coupons, woocommerce coupon, woocommerce

custom-coupon-messages/custom-coupon-messages.php 92% from 13 tests

The principal PHP file in "WooCommerce Custom Coupon Messages" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

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
No dangerous file extensions were detected360 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1520347
CSS10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin