79% corvuspay-woocommerce-integration

Code Review | CorvusPay WooCommerce Payment Gateway

WordPress plugin CorvusPay WooCommerce Payment Gateway scored79%from 54 tests.

About plugin

  • Plugin page: corvuspay-woocomm...
  • Plugin version: 2.5.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 19, 2015
  • Latest release: Nov 21, 2023
  • Number of updates: 87
  • Update frequency: every 35.7 days
  • Top authors: ahorvat (63.22%)corvusinfo (37.93%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /15,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.42ms] Passed 4 tests

A check of server-side resources used by CorvusPay WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.59 ▼3.21
Dashboard /wp-admin3.32 ▲0.0147.28 ▼5.88
Posts /wp-admin/edit.php3.37 ▲0.0145.87 ▼2.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.87 ▲3.38
Media Library /wp-admin/upload.php3.25 ▲0.0134.42 ▼1.70

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

CorvusPay WooCommerce Payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.37 ▲0.101.86 ▲0.1637.73 ▼7.00
Dashboard /wp-admin2,201 ▲275.64 ▲0.0288.87 ▼7.6841.45 ▼2.96
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0339.73 ▲2.8136.33 ▲1.72
Add New Post /wp-admin/post-new.php1,532 ▲623.08 ▼0.36597.67 ▼4.0062.71 ▼3.38
Media Library /wp-admin/upload.php1,406 ▲34.25 ▲0.0698.49 ▲0.8842.85 ▲0.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/assets/js/cdn.php
    • > /wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/navbar.php
    • > /wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/modal.php
    • > /wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/index.php
    • > /wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/assets/css/cdn.php
  • 42× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CorvusPay\\Service\\AbstractService' not found in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/lib/Service/CheckoutService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/corvuspay-woocommerce-integration/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      require_once(): Failed opening required '../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/api/partial-refund.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/checkout/success.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'CorvusPay\\Service\\AbstractServiceFactory' not found in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/lib/Service/CoreServiceFactory.php:5
    • > PHP Fatal error
      require_once(): Failed opening required '../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/api/next-sub-payment.php on line 2
    • > PHP Warning
      require_once(../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/api/complete.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/corvuspay-woocommerce-integration/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Warning
      require_once(../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/log/logging.php on line 2
    • > PHP Warning
      require_once(../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/corvuspay-woocommerce-integration/vendor/corvuspay/corvuspay_wallet_php_sdk/examples/api/next-sub-payment.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: credit card, corvuspay, payment, woocommerce

corvuspay-woocommerce-integration/corvuspay-woocommerce-integration.php Passed 13 tests

The entry point to "CorvusPay WooCommerce Payment Gateway" version 2.5.5 is a PHP file that has certain tags in its header comment area
56 characters long description:
Extends WooCommerce with CorvusPay Credit Card payments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected8,133 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP641,0082,2586,878
PO File1151181397
Markdown2360254
CSS212216
JavaScript2182209
JSON300140
SVG130039

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity19.64
▷ Minimum class complexity1.00
▷ Maximum class complexity219.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces6
Interfaces3
Traits2
Classes28
▷ Abstract classes414.29%
▷ Concrete classes2485.71%
▷ Final classes00.00%
Methods251
▷ Static methods249.56%
▷ Public methods20682.07%
▷ Protected methods41.59%
▷ Private methods4116.33%
Functions16
▷ Named functions743.75%
▷ Anonymous functions956.25%
Constants31
▷ Global constants516.13%
▷ Class constants2683.87%
▷ Public constants26100.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
There were not PNG files found in your plugin