89% wc-epayco-payment-gateway

Code Review | IMMAGIT ePayco Payment Gateway for WooCommerce

WordPress plugin IMMAGIT ePayco Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-epayco-payment...
  • Plugin version: 1.1.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Feb 9, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 29
  • Update frequency: every 21.6 days
  • Top authors: immagitoficial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,885 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.65ms] Passed 4 tests

Server-side resources used by IMMAGIT ePayco Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.81 ▲0.75
Dashboard /wp-admin3.37 ▲0.0643.93 ▼7.34
Posts /wp-admin/edit.php3.42 ▲0.0647.01 ▲0.95
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.10 ▼4.95
Media Library /wp-admin/upload.php3.29 ▲0.0634.60 ▲2.16

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

IMMAGIT ePayco Payment Gateway for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.17 ▼0.402.12 ▲0.5541.51 ▲4.17
Dashboard /wp-admin2,202 ▲255.54 ▲0.0185.48 ▼15.0339.46 ▼5.83
Posts /wp-admin/edit.php2,110 ▲101.97 ▲0.0241.93 ▲5.0747.18 ▲10.08
Add New Post /wp-admin/post-new.php1,535 ▲123.10 ▲0.42661.13 ▲20.2450.70 ▲2.25
Media Library /wp-admin/upload.php1,410 ▲104.23 ▲0.04101.25 ▼3.5344.83 ▼0.65

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: epayco, gateways, immagit, ecommerce, colombia...

wc-epayco-payment-gateway/wc-epayco-payment-gateway.php 77% from 13 tests

The main PHP file in "IMMAGIT ePayco Payment Gateway for WooCommerce" ver. 1.1.6.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 182 characters long)
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.2" instead of "7.0")

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
Good job! No executable or dangerous file extensions detected3,725 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File36,28217,9102,019
PHP7133941,706

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity70.80
▷ Minimum class complexity16.00
▷ Maximum class complexity147.00
Average method complexity6.37
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods65
▷ Static methods23.08%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/redirect-v1.png0.32KB0.28KB▼ 13.15%
assets/images/logo_epayco_200px.png5.02KB3.41KB▼ 32.00%
assets/images/logo_epayco_400px.png10.65KB6.07KB▼ 43.01%
assets/images/pagos_procesados_por_epayco_260px_.png12.99KB5.11KB▼ 60.68%
assets/images/epayco_pago_seguro.png16.60KB6.72KB▼ 59.49%