78% aba-payway-woocommerce-payment-gateway

Code Review | ABA PayWay Payment Gateway for WooCommerce

WordPress plugin ABA PayWay Payment Gateway for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: aba-payway-woocom...
  • Plugin version: 2.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Sep 2, 2019
  • Latest release: Nov 22, 2023
  • Number of updates: 98
  • Update frequency: every 15.9 days
  • Top authors: abapayway (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /10,671 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by ABA PayWay Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0531.64 ▼8.29
Dashboard /wp-admin3.35 ▲0.0457.50 ▼3.81
Posts /wp-admin/edit.php3.38 ▲0.0254.62 ▲6.92
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.53 ▲3.67
Media Library /wp-admin/upload.php3.27 ▲0.0440.48 ▲5.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ABA PayWay Payment Gateway for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼29714.64 ▲0.290.75 ▼0.7913.15 ▼26.45
Dashboard /wp-admin2,192 ▲185.62 ▲0.0897.30 ▼8.9343.18 ▲1.65
Posts /wp-admin/edit.php2,100 ▲31.96 ▲0.0235.98 ▼3.6831.60 ▼4.92
Add New Post /wp-admin/post-new.php1,525 ▼122.06 ▼1.41682.62 ▲55.9770.68 ▲15.99
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.00103.92 ▲8.2648.80 ▲7.23

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/aba-payway-woocommerce-payment-gateway/aba-payway-for-woocommerce.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/aba-payway-woocommerce-payment-gateway/PayWayApiCheckout.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
2 plugin tags: online payment gateway, e-commerce

aba-payway-woocommerce-payment-gateway/aba-payway-for-woocommerce.php 92% from 13 tests

The principal PHP file in "ABA PayWay Payment Gateway for WooCommerce" v. 2.1.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("aba-payway-woocommerce-payment-gateway.php" instead of "aba-payway-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,609 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript313543714
PHP29056703
SVG800180
CSS13312

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods2083.33%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
55 PNG files occupy 0.23MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/white/1x/alipay.png0.99KB0.57KB▼ 42.19%
images/color/1x/cards.png1.61KB0.71KB▼ 56.09%
images/color/3x/wechat.png2.35KB1.24KB▼ 47.20%
images/color/1x/alipay.png0.99KB0.57KB▼ 42.19%
images/color/3x/aba.png7.36KB2.35KB▼ 68.03%