83% chargily-epay-gateway

Code Review | Chargily ePay Gateway

WordPress plugin Chargily ePay Gateway scored83%from 54 tests.

About plugin

  • Plugin page: chargily-epay-gat...
  • Plugin version: 2.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.9
  • WordPress version: 6.3.1
  • First release: Dec 12, 2021
  • Latest release: Apr 18, 2022
  • Number of updates: 20
  • Update frequency: every 7.5 days
  • Top authors: chargily (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,437 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.97ms] Passed 4 tests

A check of server-side resources used by Chargily ePay Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.71 ▼1.24
Dashboard /wp-admin3.39 ▲0.0946.41 ▼8.64
Posts /wp-admin/edit.php3.50 ▲0.1550.36 ▼0.67
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.34 ▲2.02
Media Library /wp-admin/upload.php3.31 ▲0.0934.07 ▼1.32

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Chargily ePay Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.101.71 ▼0.0142.95 ▼1.00
Dashboard /wp-admin2,206 ▲154.86 ▼0.24110.44 ▲2.1141.65 ▲2.58
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0139.75 ▼3.1235.76 ▼1.08
Add New Post /wp-admin/post-new.php1,545 ▲2618.07 ▼5.28612.54 ▼22.6150.01 ▼10.70
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.03102.17 ▼3.8545.04 ▲0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chargily-epay-gateway/payment_methods/cib.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chargily-epay-gateway/payment_methods/edahabia.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/chargily-epay-gateway/chargily.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/chargily-epay-gateway/function.php:4

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

chargily-epay-gateway/chargily.php 92% from 13 tests

The main PHP file in "Chargily ePay Gateway" ver. 2.1.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("chargily-epay-gateway.php" instead of "chargily.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected494 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP411428494

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity29.00
▷ Minimum class complexity27.00
▷ Maximum class complexity31.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/edahabia-logo.png4.19KB0.00KB▼ 100.00%
(invalid) assets/cib-logo.png4.19KB0.00KB▼ 100.00%