83% wc-getloy-gateway

Code Review | GetLoy payment gateway for WooCommerce (supports iPay88, PayWay and Pi Pay)

WordPress plugin GetLoy payment gateway for WooCommerce (supports iPay88, PayWay and Pi Pay) scored83%from 54 tests.

About plugin

  • Plugin page: wc-getloy-gateway
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Jan 28, 2018
  • Latest release: Feb 20, 2022
  • Number of updates: 29
  • Update frequency: every 51.2 days
  • Top authors: geekho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,069 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by GetLoy payment gateway for WooCommerce (supports iPay88, PayWay and Pi Pay)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.84 ▼2.23
Dashboard /wp-admin3.31 ▲0.0061.43 ▲10.36
Posts /wp-admin/edit.php3.36 ▲0.0051.16 ▲2.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.93 ▼16.11
Media Library /wp-admin/upload.php3.23 ▲0.0035.88 ▼1.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GetLoy payment gateway for WooCommerce (supports iPay88, PayWay and Pi Pay)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.18 ▼0.181.77 ▼0.1644.36 ▲5.02
Dashboard /wp-admin2,195 ▲155.58 ▼0.0898.08 ▲4.9343.06 ▼3.58
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0034.82 ▼0.4832.49 ▼6.21
Add New Post /wp-admin/post-new.php1,526 ▼221.34 ▼1.52715.99 ▲21.9257.52 ▲0.96
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0498.76 ▼3.6843.76 ▲0.61

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Wc_Getloy_Payment_Gateway_Connector' not found in wp-content/plugins/wc-getloy-gateway/gateways/payway_kh/includes/class-wc-getloy-gateway-payway-kh-connector.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wc-getloy-gateway/widgets/class-getloy-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wc_Getloy_Payment_Gateway_Connector' not found in wp-content/plugins/wc-getloy-gateway/gateways/ipay88_kh/includes/class-wc-getloy-gateway-ipay88-kh-connector.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-getloy-gateway/gateways/class-wc-getloy-payment-gateway.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Getloy_Widget' not found in wp-content/plugins/wc-getloy-gateway/widgets/class-getloy-widget-payway-footer-box.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wc_Getloy_Payment_Gateway' not found in wp-content/plugins/wc-getloy-gateway/gateways/payway_kh/class-wc-getloy-gateway-payway-kh.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wc_Getloy_Payment_Gateway_Connector' not found in wp-content/plugins/wc-getloy-gateway/gateways/pipay_kh/includes/class-wc-getloy-gateway-pipay-kh-connector.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Wc_Getloy_Payment_Gateway' not found in wp-content/plugins/wc-getloy-gateway/gateways/pipay_kh/class-wc-getloy-gateway-pipay-kh.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wc_Getloy_Payment_Gateway' not found in wp-content/plugins/wc-getloy-gateway/gateways/ipay88_kh/class-wc-getloy-gateway-ipay88-kh.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: cambodia, payment gateway, woocommerce, getloy

wc-getloy-gateway/wc-getloy-gateway.php 77% from 13 tests

The entry point to "GetLoy payment gateway for WooCommerce (supports iPay88, PayWay and Pi Pay)" version 1.3.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Plugin Name: A shorter plugin name is better (currently 75 characters long instead of max. 70)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.2" instead of "3.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,034 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP153931,2921,952
CSS311069
SVG130013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.69
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes323.08%
▷ Concrete classes1076.92%
▷ Final classes00.00%
Methods105
▷ Static methods10.95%
▷ Public methods5754.29%
▷ Protected methods4441.90%
▷ Private methods43.81%
Functions12
▷ Named functions18.33%
▷ Anonymous functions1191.67%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/widgets/payway-footer-box/cards-transparent@2x.png11.96KB6.77KB▼ 43.34%
assets/images/widgets/payway-footer-box/abapay-transparent.png1.06KB1.12KB0.00%
assets/images/widgets/payway-footer-box/abapay-transparent@2x.png1.82KB1.91KB0.00%
assets/images/widgets/payway-footer-box/cards-transparent.png5.43KB3.53KB▼ 35.10%
assets/images/widgets/payway-footer-box/all-transparent@3x.png22.55KB11.59KB▼ 48.59%