83% monetbil-edd-gateway

Code Review | Monetbil - Mobile Money Gateway for Easy Digital Downloads

WordPress plugin Monetbil - Mobile Money Gateway for Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: monetbil-edd-gateway
  • Plugin version: 1.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Jun 16, 2019
  • Number of updates: 28
  • Update frequency: every 25.9 days
  • Top authors: sergentong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,527 total downloads

Benchmarks

Plugin footprint 82% 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.09MB] [CPU: ▼8.59ms] Passed 4 tests

Analyzing server-side resources used by Monetbil - Mobile Money Gateway for Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.28 ▲0.07
Dashboard /wp-admin3.41 ▲0.0647.32 ▼21.56
Posts /wp-admin/edit.php3.52 ▲0.1647.00 ▼6.64
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.94 ▼6.21
Media Library /wp-admin/upload.php3.33 ▲0.1048.01 ▲6.27

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/monetbil-edd-gateway/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Monetbil - Mobile Money Gateway for Easy Digital Downloads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.30 ▼0.914.70 ▲2.6647.46 ▲0.28
Dashboard /wp-admin2,221 ▲205.85 ▲0.74107.78 ▼12.6239.74 ▼4.49
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0339.71 ▲3.5033.77 ▼0.05
Add New Post /wp-admin/post-new.php1,550 ▲523.11 ▲0.01668.61 ▼16.7754.03 ▼10.98
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.04103.20 ▼10.6741.08 ▼8.91

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/monetbil-edd-gateway/templates/receipt.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/monetbil-edd-gateway/templates/payment-widget-v2.php:2
    • > PHP Notice
      Undefined variable: payment_url in wp-content/plugins/monetbil-edd-gateway/templates/payment-widget-v1.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/monetbil-edd-gateway/templates/payment-widget-v1.php:2
    • > PHP Notice
      Undefined variable: payment_url in wp-content/plugins/monetbil-edd-gateway/templates/payment-widget-v2.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Easy configuration.), #2 (Payment gateway selection.), #3 (Widget IFrame-based form.)
The official readme.txt might help

monetbil-edd-gateway/monetbil-edd-gateway.php 92% from 13 tests

"Monetbil - Mobile Money Gateway for Easy Digital Downloads" version 1.15's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected801 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5190201799
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods21100.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants00.00%
▷ Class constants22100.00%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
monetbil-mobile-payments-small-logo.png4.33KB2.84KB▼ 34.38%
monetbil_partners_logo.png13.64KB5.08KB▼ 62.78%