84% wc-dynamic-payment-gateways-tcs

Code Review | Dynamic Payment Gateways for WooCommerce

WordPress plugin Dynamic Payment Gateways for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-dynamic-paymen...
  • Plugin version: 1.1.2
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2022
  • Latest release: Dec 2, 2023
  • Number of updates: 18
  • Update frequency: every 19.6 days
  • Top authors: tailcodestudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /727 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.00MB] [CPU: ▼3.03ms] Passed 4 tests

An overview of server-side resources used by Dynamic Payment Gateways for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.84 ▼3.17
Dashboard /wp-admin3.31 ▲0.0046.41 ▲0.99
Posts /wp-admin/edit.php3.36 ▲0.0044.17 ▼6.13
Add New Post /wp-admin/post-new.php5.89 ▲0.00111.50 ▲14.28
Media Library /wp-admin/upload.php3.23 ▲0.0030.40 ▼3.79

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 133 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Dynamic Payment Gateways for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.74 ▲0.461.71 ▼0.2741.42 ▼3.85
Dashboard /wp-admin2,192 ▲255.58 ▼0.0592.98 ▼16.6740.33 ▲0.71
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0339.34 ▼2.1037.84 ▼0.72
Add New Post /wp-admin/post-new.php1,529 ▲323.39 ▲0.27644.68 ▲51.6050.59 ▲0.57
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.0295.43 ▼0.1939.90 ▼0.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
Please fix the following
  • 87× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/Validators/AlphaNumericDashValidatorTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/FilterTest.php:13
    • > PHP Warning
      require_once(ci/boot.php): failed to open stream: No such file or directory in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/ci/dump_validators_docs.php on line 2
    • > PHP Warning
      require_once(wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/bootstrap.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/StaticIsValidTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/Validators/AlphaNumericValidatorTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/Filters/BasicTagsFilterTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/Validators/DoesntContainListValidatorTest.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'ci/boot.php' (include_path='.:/usr/share/php') in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/ci/dump_validators_docs.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\BaseTestCase' not found in wp-content/plugins/wc-dynamic-payment-gateways-tcs/vendor/wixel/gump/tests/Filters/HtmlencodeFilterTest.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: payment gateway, ecommerce, dynamic, woocommerce, payments

wc-dynamic-payment-gateways-tcs/wc-dynamic-payment-gateways-tcs.php 92% from 13 tests

The primary PHP file in "Dynamic Payment Gateways for WooCommerce" version 1.1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("6.3" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin6,283 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141,2261,9535,690
Markdown1440254
JSON300152
PO File1171779
YAML38464
XML12023
JavaScript27021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes82
▷ Abstract classes11.22%
▷ Concrete classes8198.78%
▷ Final classes00.00%
Methods456
▷ Static methods4810.53%
▷ Public methods37381.80%
▷ Protected methods6514.25%
▷ Private methods183.95%
Functions46
▷ Named functions48.70%
▷ Anonymous functions4291.30%
Constants42
▷ Global constants12.38%
▷ Class constants4197.62%
▷ Public constants41100.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 images were found in this plugin