89% aplazo-payment-gateway

Code Review | Aplazo Payment Gateway

WordPress plugin Aplazo Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: aplazo-payment-ga...
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jan 31, 2023
  • Latest release: Nov 15, 2023
  • Number of updates: 19
  • Update frequency: every 15.7 days
  • Top authors: aplazopayment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,246 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Aplazo Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.28 ▼3.96
Dashboard /wp-admin3.31 ▲0.0142.59 ▼3.86
Posts /wp-admin/edit.php3.36 ▲0.0143.24 ▼5.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.24 ▼19.83
Media Library /wp-admin/upload.php3.23 ▲0.0134.55 ▲0.34

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Aplazo Payment Gateway: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.67 ▲0.331.75 ▼0.1139.01 ▼0.45
Dashboard /wp-admin2,195 ▲185.60 ▼0.0290.90 ▼6.0338.42 ▼6.57
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0540.39 ▼0.1736.66 ▼2.06
Add New Post /wp-admin/post-new.php1,530 ▲422.97 ▼0.16579.68 ▼134.7347.95 ▼16.65
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0294.86 ▼17.5642.57 ▼0.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This is what the Checkout looks like in your store.), #2 (Once you install the Aplazo Plugin, you have to add the keys given by your aplazo account.), #3 (When user select Aplazo payment method, the checkout will load the aplazo checkout to finish the order.)
The official readme.txt might help

aplazo-payment-gateway/woocommerce-aplazo-gateway.php 92% from 13 tests

"Aplazo Payment Gateway" version 1.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aplazo-payment-gateway.php" instead of "woocommerce-aplazo-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,091 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP10133236960
JavaScript313929896
PO File15984140
Markdown28095

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.17
▷ Minimum class complexity2.00
▷ Maximum class complexity47.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods52
▷ Static methods713.46%
▷ Public methods5198.08%
▷ Protected methods00.00%
▷ Private methods11.92%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.70MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/step-1.png1.38KB0.82KB▼ 40.48%
assets/images/logo-raw.png29.82KB11.78KB▼ 60.50%
assets/images/step-3.png1.43KB0.84KB▼ 41.17%
assets/images/aplazo-desc-movil.png267.04KB101.17KB▼ 62.12%
assets/images/aplazo-description.png418.30KB169.96KB▼ 59.37%