84% woocommerce-gateway-eway

Code Review | WooCommerce Eway Gateway

WordPress plugin WooCommerce Eway Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-gatew...
  • Plugin version: 3.7.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: May 3, 2018
  • Latest release: Sep 28, 2023
  • Number of updates: 46
  • Update frequency: every 42.9 days
  • Top authors: automattic (50%)woothemes (21.74%)cshultz88 (15.22%)bor0 (10.87%)bartoszbudzanowski (6.52%)

Code review

54 tests

User reviews

4 reviews

Install metrics

6,000+ active /131,738 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.33ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Eway Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.58 ▲1.47
Dashboard /wp-admin3.40 ▲0.1050.86 ▼3.16
Posts /wp-admin/edit.php3.51 ▲0.1650.28 ▼0.53
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.04 ▼3.11
Media Library /wp-admin/upload.php3.32 ▲0.0939.95 ▲8.11

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

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

Browser metrics Passed 4 tests

WooCommerce Eway Gateway: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.121.95 ▲0.1443.89 ▼0.69
Dashboard /wp-admin2,206 ▲184.85 ▼1.05110.08 ▼7.7544.59 ▲1.70
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0338.39 ▲1.3638.09 ▲3.77
Add New Post /wp-admin/post-new.php1,519 ▼1823.38 ▲0.42655.00 ▼23.1363.38 ▲9.00
Media Library /wp-admin/upload.php1,382 ▼34.13 ▼0.10105.31 ▼7.1142.90 ▼6.79

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 46× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Model/Response/AbstractResponse.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Model/ShippingAddress.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Model/ProcessingDetails.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Enum\\AbstractEnum' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Enum/ShippingMethod.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/woocommerce-gateway-eway/includes/class-wc-gateway-eway-blocks-support.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Model/Verification.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Enum\\AbstractEnum' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Enum/LogLevel.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Model\\Response\\AbstractResponse' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Model/Response/QueryAccessCodeResponse.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Eway\\Vendors\\Eway\\Rapid\\Model\\Response\\AbstractResponse' not found in wp-content/plugins/woocommerce-gateway-eway/vendor/vendor-prefixed/eway/eway-rapid-php/src/Rapid/Model/Response/QueryTransactionResponse.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/woocommerce-gateway-eway/templates/eway-saved-card-list.php:38

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 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
6 plugin tags: eway, gateway, credit card, woocommerce, automattic...

woocommerce-gateway-eway/woocommerce-gateway-eway.php 85% from 13 tests

The primary PHP file in "WooCommerce Eway Gateway" version 3.7.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin5,361 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP941,2423,8115,257
JSON10065
Markdown111018
SVG80016
JavaScript3004
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.71
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces4
Traits16
Classes58
▷ Abstract classes1525.86%
▷ Concrete classes4374.14%
▷ Final classes12.33%
Methods340
▷ Static methods3610.59%
▷ Public methods26277.06%
▷ Protected methods216.18%
▷ Private methods5716.76%
Functions21
▷ Named functions1257.14%
▷ Anonymous functions942.86%
Constants85
▷ Global constants67.06%
▷ Class constants7992.94%
▷ Public constants79100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin