88% b2binpay-payments-for-woocommerce

Code Review | B2BinPay Payments for WooCommerce

WordPress plugin B2BinPay Payments for WooCommerce scored 88% from 53 tests.

About plugin

  • Plugin page: b2binpay-payments...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 5.8.1
  • First release: Nov 20, 2018
  • Latest release: Oct 28, 2019
  • Number of updates: 11
  • Update frequency: every 31.1 days
  • Top authors: b2binpay (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 555 total downloads


Plugin footprint Passed 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.00MB] [CPU: ▼262.54ms] Passed 4 tests

This is a short check of server-side resources used by B2BinPay Payments for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.39 ▲13.04
Dashboard /wp-admin3.06 ▲0.0135.23 ▼9.74
Posts /wp-admin/edit.php3.11 ▲0.0141.10 ▲3.21
Add New Post /wp-admin/post-new.php5.43 ▼0.0093.28 ▼1,033.56
Media Library /wp-admin/upload.php3.01 ▼0.0030.74 ▼10.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 181 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for B2BinPay Payments for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,650 ▲4415.84 ▲0.316.83 ▼2.2754.70 ▲5.09
Dashboard /wp-admin2,934 ▲815.89 ▲0.05132.45 ▲1.28112.73 ▲7.78
Posts /wp-admin/edit.php2,706 ▼02.69 ▼0.0065.13 ▼0.9393.00 ▼1.61
Add New Post /wp-admin/post-new.php1,653 ▼018.70 ▼0.09345.15 ▼37.07106.63 ▼1.26
Media Library /wp-admin/upload.php1,775 ▼05.03 ▼0.00140.44 ▼2.13114.17 ▲0.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% 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 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/b2binpay-payments-for-woocommerce/includes/b2binpay/api-php/public/index.php
  • 66× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/b2binpay/api-php/tests/v1/ApiTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/b2binpay/api-php/tests/IntegrationTest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/guzzlehttp/psr7/src/PumpStream.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/b2binpay-payments-for-woocommerce/includes/b2binpay/api-php/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/b2binpay/api-php/public/index.php on line 7
    • > PHP Fatal error
      Uncaught Error: Interface 'Litipk\\BigNumbers\\Errors\\BigNumbersError' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/litipk/php-bignumbers/src/Errors/NaNInputError.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/guzzlehttp/guzzle/src/Exception/TransferException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/b2binpay-payments-for-woocommerce/includes/guzzlehttp/guzzle/src/Exception/ConnectException.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

b2binpay-payments-for-woocommerce/b2binpay-payments-for-woocommerce.php 92% from 13 tests

The primary PHP file in "B2BinPay Payments for WooCommerce" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin16,134 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.86
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes99100.00%
▷ Final classes1111.11%
▷ Static methods11012.00%
▷ Public methods75482.22%
▷ Protected methods171.85%
▷ Private methods14615.92%
▷ Named functions7141.04%
▷ Anonymous functions10258.96%
▷ Global constants33.95%
▷ Class constants7396.05%
▷ Public constants73100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/b2binpay.png2.34KB2.12KB▼ 9.30%