89% woo-alpha-bank-payment-gateway

Code Review | Payment Gateway - Alpha Bank for WooCommerce

WordPress plugin Payment Gateway - Alpha Bank for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-alpha-bank-pa...
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Oct 16, 2019
  • Latest release: Feb 21, 2022
  • Number of updates: 17
  • Update frequency: every 50.8 days
  • Top authors: enartia (82.35%)georgekapsalakis (23.53%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /14,327 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼4.59ms] Passed 4 tests

Server-side resources used by Payment Gateway - Alpha Bank for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2137.04 ▼5.45
Dashboard /wp-admin3.52 ▲0.2148.70 ▼3.34
Posts /wp-admin/edit.php3.63 ▲0.2751.29 ▲2.92
Add New Post /wp-admin/post-new.php6.10 ▲0.2188.76 ▼12.49
Media Library /wp-admin/upload.php3.44 ▲0.2138.37 ▲6.18

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Payment Gateway - Alpha Bank for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.304.19 ▲1.8238.56 ▼10.59
Dashboard /wp-admin2,203 ▲154.87 ▼0.9999.10 ▼17.4438.59 ▼3.65
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0039.97 ▲4.4833.79 ▲1.24
Add New Post /wp-admin/post-new.php1,535 ▲223.32 ▲0.11652.40 ▲54.8961.26 ▲12.61
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.05100.34 ▲1.2342.90 ▼1.67

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
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: alphabank, ecommerce, alpha, woocommerce, payment gateway

woo-alpha-bank-payment-gateway/wooshop-alpha.php 85% from 13 tests

"Payment Gateway - Alpha Bank for WooCommerce" version 1.3.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-alpha-bank-payment-gateway.php" instead of "wooshop-alpha.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 185 characters long)

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
Good job! No executable or dangerous file extensions detected1,395 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2171881,129
PO File188135266

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity43.33
▷ Minimum class complexity3.00
▷ Maximum class complexity65.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/alpha_cards.png21.56KB7.83KB▼ 63.68%