89% monnify-payment-gateway

Code Review | Payment Gateway for Monnify on WooCommerce

WordPress plugin Payment Gateway for Monnify on WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: monnify-payment-g...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 30, 2020
  • Latest release: Apr 4, 2023
  • Number of updates: 11
  • Update frequency: every 75.0 days
  • Top authors: biodunhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,046 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Payment Gateway for Monnify on WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.15 ▲6.07
Dashboard /wp-admin3.31 ▲0.0150.19 ▼4.81
Posts /wp-admin/edit.php3.36 ▲0.0166.70 ▲15.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.10 ▼5.43
Media Library /wp-admin/upload.php3.24 ▲0.0134.87 ▼1.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Payment Gateway for Monnify on WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.37 ▲0.061.97 ▼0.1140.66 ▼5.08
Dashboard /wp-admin2,200 ▲155.79 ▼0.05100.23 ▼16.5641.51 ▼3.86
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0343.85 ▲5.4037.46 ▲0.44
Add New Post /wp-admin/post-new.php1,538 ▲1923.08 ▼0.18686.91 ▼5.1675.30 ▲17.63
Media Library /wp-admin/upload.php1,388 ▼04.31 ▲0.0896.31 ▼7.3246.19 ▼1.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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
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

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 need to be fixed:
  • Screenshots: Please add an image for screenshot #3 (Monnify inline payment page)
Please take inspiration from this readme.txt

monnify-payment-gateway/wc-monnify-payment-gateway.php 92% from 13 tests

Analyzing the main PHP file in "Payment Gateway for Monnify on WooCommerce" version 1.0.6
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("monnify-payment-gateway.php" instead of "wc-monnify-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected613 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2128157385
JavaScript21324142
Markdown145086

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/monnify.png29.12KB10.22KB▼ 64.90%