78% aquagates-payments-for-woocommerce

Code Review | AquaGates Payments for WooCommerce

WordPress plugin AquaGates Payments for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: aquagates-payment...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2023
  • Latest release: Aug 22, 2023
  • Number of updates: 6
  • Update frequency: every 22.0 days
  • Top authors: aquagates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 102 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.66ms] Passed 4 tests

Analyzing server-side resources used by AquaGates Payments for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.49 ▲4.93
Dashboard /wp-admin3.31 ▲0.0145.08 ▼3.54
Posts /wp-admin/edit.php3.36 ▲0.0049.40 ▲2.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.48 ▼5.12
Media Library /wp-admin/upload.php3.23 ▲0.0033.32 ▼0.23

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AquaGates Payments for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.26 ▼1.021.75 ▼0.0540.42 ▼5.45
Dashboard /wp-admin2,216 ▲284.86 ▼0.24109.13 ▲1.6050.63 ▲7.60
Posts /wp-admin/edit.php2,095 ▲62.05 ▼0.0040.59 ▲0.8442.60 ▲7.78
Add New Post /wp-admin/post-new.php1,539 ▲523.07 ▼0.11588.56 ▼87.4952.59 ▼6.86
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0796.32 ▼15.0548.10 ▼0.93

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/aquagates-payments-for-woocommerce/public/aquagates-payments-link-payresulthook.php
    • > /wp-content/plugins/aquagates-payments-for-woocommerce/public/partials/aquagates-payments-public-display.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/aquagates-payments-for-woocommerce/aquagates/DataEntity.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/aquagates-payments-for-woocommerce/admin/partials/aquagates-payments-admin-display.php:14

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: aquagates, credit cards, woocommerce, japan, payment

aquagates-payments-for-woocommerce/aquagates-payments.php 85% from 13 tests

The main file in "AquaGates Payments for WooCommerce" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("aquagates-payments-for-woocommerce.php" instead of "aquagates-payments.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,264 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP267248643,214
CSS28844
JavaScript24546

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 217)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.50
▷ Minimum class complexity1.00
▷ Maximum class complexity253.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity217.00
Code structure
Namespaces0
Interfaces0
Traits4
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods166
▷ Static methods21.20%
▷ Public methods14788.55%
▷ Protected methods106.02%
▷ Private methods95.42%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin