84% payment-gateway-accept-blue-for-woocommerce

Code Review | Payment gateway: accept.blue for WooCommerce

WordPress plugin Payment gateway: accept.blue for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: payment-gateway-a...
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 27
  • Update frequency: every 13.7 days
  • Top authors: devurai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼7.90ms] Passed 4 tests

An overview of server-side resources used by Payment gateway: accept.blue for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2642.30 ▲1.85
Dashboard /wp-admin3.58 ▲0.2445.60 ▼16.95
Posts /wp-admin/edit.php3.63 ▲0.2850.22 ▲3.69
Add New Post /wp-admin/post-new.php6.10 ▲0.2190.47 ▼15.03
Media Library /wp-admin/upload.php3.44 ▲0.2133.67 ▼1.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 190 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Payment gateway: accept.blue for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.37 ▲1.261.81 ▼2.8242.43 ▼1.01
Dashboard /wp-admin2,198 ▲215.69 ▲0.0790.51 ▼6.7443.69 ▲1.29
Posts /wp-admin/edit.php2,103 ▼01.94 ▼0.0639.55 ▼3.7337.65 ▲2.40
Add New Post /wp-admin/post-new.php1,528 ▼623.19 ▼2.15586.47 ▼73.5681.03 ▲3.80
Media Library /wp-admin/upload.php1,406 ▲64.20 ▲0.00100.88 ▲1.7042.43 ▲0.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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 | 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
  • 52× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/includes/wc-acceptblue-gateway-credit-card.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/includes/ach-fields-acceptblue.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/vendor/guzzlehttp/psr7/src/Request.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: acceptblue, credit card, ach, payments

payment-gateway-accept-blue-for-woocommerce/acceptblue-payments.php 85% from 13 tests

The entry point to "Payment gateway: accept.blue for WooCommerce" version 1.4.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("payment-gateway-accept-blue-for-woocommerce.php" instead of "acceptblue-payments.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin69,661 lines of code in 177 files:
LanguageFilesBlank linesComment linesLines of code
PHP13346,72840,97262,357
Markdown151,27803,664
SVG10521,897
JSON10001,046
JavaScript78469418
CSS1493272
YAML1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity13.80
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes84
▷ Abstract classes00.00%
▷ Concrete classes84100.00%
▷ Final classes3541.67%
Methods840
▷ Static methods14617.38%
▷ Public methods71084.52%
▷ Protected methods40.48%
▷ Private methods12615.00%
Functions175
▷ Named functions8448.00%
▷ Anonymous functions9152.00%
Constants81
▷ Global constants89.88%
▷ Class constants7390.12%
▷ Public constants6284.93%

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