93% woo-eway-addon

Code Review | Addon for Eway and WooCommerce

WordPress plugin Addon for Eway and WooCommerce scored 93% from 53 tests.

About plugin

  • Plugin page: woo-eway-addon
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.3.2
  • WordPress version: 5.8.1
  • First release: Apr 26, 2016
  • Latest release: Dec 31, 2019
  • Number of updates: 154
  • Update frequency: every 8.8 days
  • Top authors: wp_estatic (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 1,537 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼317.38ms] Passed 4 tests

This is a short check of server-side resources used by Addon for Eway and WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0040.82 ▲10.84
Dashboard /wp-admin3.06 ▲0.0043.74 ▲1.46
Posts /wp-admin/edit.php3.11 ▲0.0040.16 ▼6.45
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.93 ▼1,262.05
Media Library /wp-admin/upload.php3.00 ▼0.0135.40 ▼2.48

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 151 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Addon for Eway and WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,650 ▲6916.18 ▲0.617.30 ▼0.2949.11 ▲2.47
Dashboard /wp-admin2,931 ▲786.12 ▲0.30135.40 ▼8.27102.61 ▲9.61
Posts /wp-admin/edit.php2,703 ▼32.69 ▼0.1264.79 ▲3.6696.51 ▲15.48
Add New Post /wp-admin/post-new.php1,577 ▼27618.51 ▼0.68368.95 ▼6.97109.56 ▼1.63
Media Library /wp-admin/upload.php1,775 ▼05.02 ▲0.02152.42 ▼4.87118.88 ▲3.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 72× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woo-eway-addon/src/Rapid/Model/ShippingAddress.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woo-eway-addon/src/Rapid/Model/ProcessingDetails.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Model\\Response\\AbstractResponse' not found in wp-content/plugins/woo-eway-addon/vendor/eway/eway-rapid-php/src/Rapid/Model/Response/QueryCustomerResponse.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Enum\\AbstractEnum' not found in wp-content/plugins/woo-eway-addon/vendor/eway/eway-rapid-php/src/Rapid/Enum/TransactionType.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Enum\\AbstractEnum' not found in wp-content/plugins/woo-eway-addon/src/Rapid/Enum/TransactionType.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Enum\\AbstractEnum' not found in wp-content/plugins/woo-eway-addon/src/Rapid/Enum/FraudAction.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woo-eway-addon/vendor/eway/eway-rapid-php/src/Rapid/Model/SettlementSearch.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Model\\AbstractModel' not found in wp-content/plugins/woo-eway-addon/vendor/eway/eway-rapid-php/src/Rapid/Model/Item.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Eway\\Rapid\\Model\\Response\\AbstractResponse' not found in wp-content/plugins/woo-eway-addon/vendor/eway/eway-rapid-php/src/Rapid/Model/Response/QueryTransactionResponse.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Eway\\Rapid\\Contract\\Http\\ResponseInterface' not found in wp-content/plugins/woo-eway-addon/src/Rapid/Service/Http/Response.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
  • Tags: You are using too many tags: 23 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-eway-addon/woo-eway-addon.php 92% from 13 tests

"Addon for Eway and WooCommerce" version 2.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin4,196 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
PHP849892,9183,677
INI100245
Markdown3600127
JSON300106
JavaScript12041

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.44
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces8
Traits32
Classes88
▷ Abstract classes2932.95%
▷ Concrete classes5967.05%
▷ Final classes00.00%
Methods376
▷ Static methods297.71%
▷ Public methods30280.32%
▷ Protected methods82.13%
▷ Private methods6617.55%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants147
▷ Global constants64.08%
▷ Class constants14195.92%
▷ Public constants141100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mastercard.png2.03KB1.48KB▼ 26.86%
images/discover.png1.45KB1.56KB0.00%
images/dinersclub.png1.34KB1.53KB0.00%
images/jcb.png1.65KB1.39KB▼ 15.51%
images/visa.png1.44KB1.10KB▼ 23.51%