88% wc-checkout-getnet

Code Review | Coffee Code - Getnet for WooCommerce

WordPress plugin Coffee Code - Getnet for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: wc-checkout-getnet
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.2
  • WordPress version: 5.9.2
  • First release: Oct 7, 2021
  • Latest release: Feb 19, 2022
  • Number of updates: 13
  • Update frequency: every 10.5 days
  • Top authors: coffeecodetech (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

60+ active / 609 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.35MB] [CPU: ▼288.16ms] Passed 4 tests

Analyzing server-side resources used by Coffee Code - Getnet for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4061.32 ▲8.79
Dashboard /wp-admin4.76 ▲1.3439.80 ▲5.39
Posts /wp-admin/edit.php4.98 ▲1.3443.81 ▲4.73
Add New Post /wp-admin/post-new.php8.28 ▲1.31100.25 ▼1,171.00
Media Library /wp-admin/upload.php4.70 ▲1.4032.86 ▲8.25

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 701 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Coffee Code - Getnet for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,779 ▲2515.97 ▼0.056.58 ▲0.842.13 ▼0.33
Dashboard /wp-admin2,904 ▲436.12 ▼0.10117.18 ▼17.44154.69 ▼7.69
Posts /wp-admin/edit.php2,705 ▲333.23 ▼0.0163.68 ▼1.13138.35 ▼5.51
Add New Post /wp-admin/post-new.php1,672 ▲1216.05 ▼0.26402.57 ▼27.91155.94 ▲0.19
Media Library /wp-admin/upload.php1,711 ▲135.53 ▲0.00142.50 ▲7.51187.21 ▲0.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wc-checkout-getnet/views/partials/dependency/missing-ecfb.php
  • 222× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-checkout-getnet/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/wc-checkout-getnet/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/wc-checkout-getnet/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-checkout-getnet/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-checkout-getnet/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wc-checkout-getnet/vendor/guzzlehttp/psr7/src/DroppingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-checkout-getnet/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-checkout-getnet/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wc-checkout-getnet/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-checkout-getnet/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: woocommerce, payments, billet, santander, credit card...

wc-checkout-getnet/wc-checkout-getnet.php 92% from 13 tests

The main PHP file in "Coffee Code - Getnet for WooCommerce" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "4.7")

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
Everything looks great! No dangerous files found in this plugin33,313 lines of code in 394 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43,7932,55016,253
PHP3453,7429,97614,471
JSON131201,081
Markdown94790785
YAML10745432
reStructuredText19613997
XML411088
HTML30085
CSS421018
Bourne Shell1203

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.02
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces46
Interfaces29
Traits19
Classes257
▷ Abstract classes20.78%
▷ Concrete classes25599.22%
▷ Final classes124.71%
Methods1,231
▷ Static methods15212.35%
▷ Public methods1,03083.67%
▷ Protected methods13510.97%
▷ Private methods665.36%
Functions180
▷ Named functions4122.78%
▷ Anonymous functions13977.22%
Constants56
▷ Global constants2951.79%
▷ Class constants2748.21%
▷ Public constants2696.30%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.60MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/mpdf/qrcode/tests/reference/LOREM-IPSUM-2019-L-100.png29.52KB0.25KB▼ 99.14%
dist/images/pix.044cc342e0.png7.77KB7.88KB0.00%
(invalid) dist/images/sprite.png0.00KB0.00KB0.00%
dist/images/barcode.52cc72e6ee.png0.53KB0.57KB0.00%
vendor/mpdf/qrcode/tests/reference/LOREM-IPSUM-2019-Q-250.png183.72KB0.33KB▼ 99.82%