79% affiliate-woocommerce-coupons-integration

Code Review | Affiliate WooCommerce Coupons Integration

WordPress plugin Affiliate WooCommerce Coupons Integration scored79%from 54 tests.

About plugin

  • Plugin page: affiliate-woocomm...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Jul 13, 2021
  • Number of updates: 13
  • Update frequency: every 197.9 days
  • Top authors: mra13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,260 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.96MB] [CPU: ▼42.75ms] Passed 4 tests

Server-side resources used by Affiliate WooCommerce Coupons Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.88 ▼2.33
Dashboard /wp-admin3.00 ▼0.3531.23 ▼33.94
Posts /wp-admin/edit.php3.00 ▼0.3626.01 ▼23.87
Add New Post /wp-admin/post-new.php3.00 ▼2.8927.46 ▼98.08
Media Library /wp-admin/upload.php3.00 ▼0.2320.50 ▼15.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affiliate WooCommerce Coupons Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲0.851.73 ▲0.0337.81 ▼2.40
Dashboard /wp-admin2,198 ▲245.62 ▼0.0591.71 ▼14.5939.97 ▼4.86
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0039.09 ▼2.7534.44 ▼2.84
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▼0.15610.15 ▼25.0761.62 ▲5.37
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.0199.38 ▼9.1043.03 ▼2.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/affiliate-woocommerce-coupons-integration/aff-woo-coupons-addon.php+80
    Use of undefined constant WP_AFF_PLATFORM_PATH - assumed 'WP_AFF_PLATFORM_PATH' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

affiliate-woocommerce-coupons-integration/aff-woo-coupons-addon.php 92% from 13 tests

The main file in "Affiliate WooCommerce Coupons Integration" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("affiliate-woocommerce-coupons-integration.php" instead of "aff-woo-coupons-addon.php")

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
There were no executable files found in this plugin289 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.67
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods29.09%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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