83% wc-mpesa-payment-gateway

Code Review | EeroPay Payment Gateway

WordPress plugin EeroPay Payment Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: wc-mpesa-payment-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2023
  • Latest release: Apr 13, 2023
  • Number of updates: 9
  • Update frequency: every 4.1 days
  • Top authors: aeydev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.97ms] Passed 4 tests

A check of server-side resources used by EeroPay Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.01 ▲1.69
Dashboard /wp-admin3.35 ▲0.0543.68 ▼2.35
Posts /wp-admin/edit.php3.40 ▲0.0447.16 ▼0.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.98 ▼0.79
Media Library /wp-admin/upload.php3.27 ▲0.0435.95 ▲0.12

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by EeroPay Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.19 ▼1.402.04 ▲0.4442.07 ▲1.60
Dashboard /wp-admin2,206 ▲244.86 ▼0.21107.72 ▲8.3843.22 ▲4.00
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0241.12 ▲4.9135.95 ▲5.03
Add New Post /wp-admin/post-new.php1,534 ▲123.36 ▲0.09623.00 ▼162.7162.63 ▲7.39
Media Library /wp-admin/upload.php1,388 ▲34.30 ▲0.2094.59 ▼12.9543.33 ▼4.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-mpesa-payment-gateway/payment-gateway-for-mpesa-on-woocommerce.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

wc-mpesa-payment-gateway/payment-gateway-for-mpesa-on-woocommerce.php 77% from 13 tests

The main PHP script in "EeroPay Payment Gateway" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-mpesa-payment-gateway.php" instead of "payment-gateway-for-mpesa-on-woocommerce.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
No dangerous file extensions were detected371 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17847209
CSS170162

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.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
No PNG files were detected