84% paygate-payweb-for-woocommerce

Code Review | Paygate for WooCommerce

WordPress plugin Paygate for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: paygate-payweb-fo...
  • Plugin version: 1.4.7
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2021
  • Latest release: Nov 22, 2023
  • Number of updates: 25
  • Update frequency: every 31.8 days
  • Top authors: appinlet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /7,458 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.00MB] [CPU: ▼2.46ms] Passed 4 tests

This is a short check of server-side resources used by Paygate for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0049.18 ▲8.01
Dashboard /wp-admin3.31 ▲0.0045.51 ▼4.28
Posts /wp-admin/edit.php3.36 ▲0.0046.25 ▼3.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.17 ▼2.43
Media Library /wp-admin/upload.php3.23 ▲0.0034.30 ▲0.58

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Paygate for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.06 ▼0.451.67 ▼0.0044.13 ▼0.20
Dashboard /wp-admin2,195 ▲185.58 ▼0.2794.02 ▼2.6842.69 ▼3.17
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0841.00 ▼0.4935.77 ▼3.23
Add New Post /wp-admin/post-new.php1,526 ▼023.37 ▲0.01593.96 ▼105.6256.69 ▼10.86
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.1295.99 ▼6.4940.77 ▼4.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_PayGate' not found in wp-content/plugins/paygate-payweb-for-woocommerce/classes/WC_Gateway_PayGate_Cron.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paygate-payweb-for-woocommerce/gateway-paygate.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_PayGate' not found in wp-content/plugins/paygate-payweb-for-woocommerce/classes/WC_Gateway_PayGate_Portal.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/paygate-payweb-for-woocommerce/classes/WC_Gateway_PayGate_Blocks_Support.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: woocommerce, payment request, e-commerce, automattic, paygate...

paygate-payweb-for-woocommerce/gateway-paygate.php 92% from 13 tests

"Paygate for WooCommerce" version 1.4.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paygate-payweb-for-woocommerce.php" instead of "gateway-paygate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,983 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP72754031,846
SVG1300133
JavaScript3023
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity49.80
▷ Minimum class complexity6.00
▷ Maximum class complexity120.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods57
▷ Static methods1017.54%
▷ Public methods4070.18%
▷ Protected methods1729.82%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants101
▷ Global constants00.00%
▷ Class constants101100.00%
▷ Public constants101100.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
There were not PNG files found in your plugin