84% galax-pay-woocommerce

Code Review | Galax Pay WooCommerce

WordPress plugin Galax Pay WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: galax-pay-woocomm...
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: May 4, 2023
  • Number of updates: 139
  • Update frequency: every 8.6 days
  • Top authors: hamiltondev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,950 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Galax Pay WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.02 ▼5.31
Dashboard /wp-admin3.31 ▲0.0049.02 ▼5.67
Posts /wp-admin/edit.php3.36 ▲0.0051.28 ▲0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.37 ▼7.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.57 ▼1.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Galax Pay WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.34 ▼0.011.85 ▲0.0049.12 ▲5.73
Dashboard /wp-admin2,202 ▲225.51 ▼0.1084.03 ▼5.4440.29 ▼0.92
Posts /wp-admin/edit.php2,107 ▲71.95 ▼0.0446.94 ▲11.1143.39 ▲10.81
Add New Post /wp-admin/post-new.php1,437 ▼9821.86 ▲3.78542.96 ▼116.7530.53 ▼33.75
Media Library /wp-admin/upload.php1,407 ▲74.16 ▼0.04103.21 ▲1.3343.17 ▼6.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GalaxPayBaseGateway' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayPix.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_API' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPaySettings.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GalaxPayBaseGateway' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayBoleto.php:2
    • > PHP Fatal error
      Trait 'GalaxPayGetInfoOrder' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayPayment.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayDependencies.php on line 4
    • > PHP Fatal error
      Trait 'GalaxActionStatusWebhook' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayWebhooks.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayBaseGateway.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GalaxPayBaseGateway' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayCreditCard.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayDependencies.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'GalaxPayBaseGateway' not found in wp-content/plugins/galax-pay-woocommerce/includes/GalaxPayPixBoleto.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

galax-pay-woocommerce/galax-pay-woocommerce.php 92% from 13 tests

The main PHP file in "Galax Pay WooCommerce" ver. 5.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:
  • Domain Path: The domain path folder does not exist ("/languages/")

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
Good job! No executable or dangerous file extensions detected2,752 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,013922,703
JavaScript29049

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.28
Average class complexity14.58
▷ Minimum class complexity2.00
▷ Maximum class complexity51.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits4
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods213
▷ Static methods136.10%
▷ Public methods12659.15%
▷ Protected methods5324.88%
▷ Private methods3415.96%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin