82% epayco-gateway

Code Review | ePayco plugin for WooCommerce

WordPress plugin ePayco plugin for WooCommerce scored 82% from 54 tests.

About plugin

  • Plugin page: epayco-gateway
  • Plugin version: 6.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Jun 8, 2022
  • Latest release: Jun 9, 2022
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: epayco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active / 8,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼2.75ms] Passed 4 tests

A check of server-side resources used by ePayco plugin for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2543.93 ▲5.53
Dashboard /wp-admin3.55 ▲0.2551.21 ▲4.29
Posts /wp-admin/edit.php3.67 ▲0.3146.23 ▼6.21
Add New Post /wp-admin/post-new.php6.13 ▲0.2588.01 ▼1.66
Media Library /wp-admin/upload.php3.48 ▲0.2536.94 ▼7.43

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

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

Browser metrics Passed 4 tests

ePayco plugin for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.33 ▼1.031.64 ▼0.0942.98 ▲1.36
Dashboard /wp-admin2,206 ▲155.91 ▲0.01112.07 ▲12.4742.53 ▼5.54
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0032.77 ▼5.1235.02 ▲0.35
Add New Post /wp-admin/post-new.php1,514 ▼1117.60 ▼5.48709.71 ▲43.1853.83 ▲2.25
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.0793.64 ▼18.1242.04 ▼4.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/epayco-gateway/lib/delete.php

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 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Screenshot #1 (The front-end view) image not found
The official readme.txt is a good inspiration

epayco-gateway/woocommerce-gateway-payco.php 77% from 13 tests

The main file in "ePayco plugin for WooCommerce" v. 6.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("epayco-gateway.php" instead of "woocommerce-gateway-payco.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,022 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4187951,838
CSS151107
Markdown113063
JavaScript11014

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 151)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity111.00
▷ Minimum class complexity6.00
▷ Maximum class complexity216.00
Average method complexity9.46
▷ Minimum method complexity1.00
▷ Maximum method complexity151.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods623.08%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 PNG files occupy 0.62MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/images/epayco3.png13.08KB5.21KB▼ 60.20%
ImgTutorialWooCommerce/tuto-7.png50.48KB22.68KB▼ 55.08%
ImgTutorialWooCommerce/tuto-8.png65.26KB25.57KB▼ 60.83%
ImgTutorialWooCommerce/tuto-3.png60.60KB23.49KB▼ 61.24%
lib/epayco.png11.93KB4.99KB▼ 58.14%