83% wc-adyen-payment-gateway

Code Review | Payment Gateway for Adyen and WooCommerce

WordPress plugin Payment Gateway for Adyen and WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-adyen-payment-...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 13, 2020
  • Latest release: Jul 23, 2022
  • Number of updates: 18
  • Update frequency: every 47.9 days
  • Top authors: wprubyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,355 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼14.22ms] Passed 4 tests

Analyzing server-side resources used by Payment Gateway for Adyen and WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1039.45 ▲4.09
Dashboard /wp-admin3.41 ▲0.1047.25 ▼0.73
Posts /wp-admin/edit.php3.53 ▲0.1643.49 ▼6.84
Add New Post /wp-admin/post-new.php5.99 ▲0.1077.87 ▼47.69
Media Library /wp-admin/upload.php3.34 ▲0.1035.85 ▼1.61

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 301 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment Gateway for Adyen and WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.29 ▼0.081.81 ▲0.1443.56 ▲2.65
Dashboard /wp-admin2,192 ▲185.59 ▲0.0383.85 ▼0.0036.01 ▼5.75
Posts /wp-admin/edit.php2,097 ▼02.02 ▲0.0134.93 ▼4.5036.96 ▲3.97
Add New Post /wp-admin/post-new.php1,526 ▼922.99 ▲4.87657.97 ▲9.8352.09 ▼15.59
Media Library /wp-admin/upload.php1,400 ▲34.10 ▼0.11110.61 ▲3.0346.55 ▲1.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 190× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Adyen\\TestCase' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/adyen/php-api-library/tests/DirectoryLookupTest.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Adyen\\Service\\AbstractResource' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/adyen/php-api-library/src/Adyen/Service/ResourceModel/Payout/ThirdParty/SubmitThirdParty.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Adyen\\Service\\AbstractResource' not found in wp-content/plugins/wc-adyen-payment-gateway/vendor/adyen/php-api-library/src/Adyen/Service/ResourceModel/Modification/RefundWithData.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% 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
4 plugin tags: woocommerce extension, payment gateway, adyen, woocommerce

wc-adyen-payment-gateway/woocommerce-adyen.php 77% from 13 tests

The main PHP file in "Payment Gateway for Adyen and WooCommerce" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-adyen-payment-gateway.php" instead of "woocommerce-adyen.php")

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
Success! There were no dangerous files found in this plugin14,444 lines of code in 288 files:
LanguageFilesBlank linesComment linesLines of code
PHP2443,1587,72312,775
JSON3100949
Markdown81880622
XML254236
YAML162128
JavaScript13020
Bourne Shell13014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.07
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces35
Interfaces11
Traits4
Classes222
▷ Abstract classes94.05%
▷ Concrete classes21395.95%
▷ Final classes00.00%
Methods1,045
▷ Static methods726.89%
▷ Public methods80677.13%
▷ Protected methods16715.98%
▷ Private methods726.89%
Functions24
▷ Named functions14.17%
▷ Anonymous functions2395.83%
Constants96
▷ Global constants44.17%
▷ Class constants9295.83%
▷ Public constants92100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin