90% checkout-fees-for-woocommerce

Code Review | Payment Gateway Based Fees and Discounts for WooCommerce

WordPress plugin Payment Gateway Based Fees and Discounts for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: checkout-fees-for...
  • Plugin version: 2.11.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Sep 3, 2015
  • Latest release: Nov 21, 2023
  • Number of updates: 125
  • Update frequency: every 24.0 days
  • Top authors: tychesoftwares (50.4%)algoritmika (50.4%)

Code review

54 tests

User reviews

51 reviews

Install metrics

20,000+ active /273,225 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.16ms] Passed 4 tests

This is a short check of server-side resources used by Payment Gateway Based Fees and Discounts for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.13 ▼3.66
Dashboard /wp-admin3.34 ▲0.0343.40 ▼2.77
Posts /wp-admin/edit.php3.39 ▲0.0345.78 ▼2.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.04 ▼3.93
Media Library /wp-admin/upload.php3.26 ▲0.0334.76 ▲0.43

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway Based Fees and Discounts for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.19 ▼0.061.59 ▼0.3737.88 ▼0.15
Dashboard /wp-admin2,195 ▲155.61 ▼0.0788.67 ▼10.0239.43 ▼5.19
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0040.15 ▼0.9139.95 ▲2.62
Add New Post /wp-admin/post-new.php1,526 ▼023.56 ▲0.39591.23 ▼72.7650.53 ▲1.30
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.13100.18 ▲3.0142.66 ▲0.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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)
There were no browser issues found


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

checkout-fees-for-woocommerce/checkout-fees-for-woocommerce.php Passed 13 tests

"Payment Gateway Based Fees and Discounts for WooCommerce" version 2.11.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
55 characters long description:
Set payment gateways fees and discounts in WooCommerce.

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
Good job! No executable or dangerous file extensions detected4,646 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity38.53
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes16.25%
▷ Static methods1311.11%
▷ Public methods117100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ 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
PNG images were not found in this plugin