84% wp-mtn-momo

Code Review | MTN MOMO

WordPress plugin MTN MOMO scored 84% from 53 tests.

About plugin

  • Plugin page: wp-mtn-momo
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.3.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.4
  • WordPress version: 5.8.1
  • First release: Jun 4, 2020
  • Latest release: Jun 4, 2020
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: bmatovu (100%)

Code review

53 tests

User reviews

1 review

Install metrics

50+ active / 1,097 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.64MB] [CPU: ▼283.08ms] Passed 4 tests

Analyzing server-side resources used by MTN MOMO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0140.44 ▲5.21
Dashboard /wp-admin3.07 ▲0.0248.11 ▲2.50
Posts /wp-admin/edit.php3.12 ▲0.0244.62 ▲4.86
Add New Post /wp-admin/post-new.php2.85 ▼2.5822.68 ▼1,133.40
Media Library /wp-admin/upload.php3.01 ▲0.0131.63 ▼6.29
Sandbox /wp-admin/admin.php?page=wp-mtn-momo/pages/sandbox.php3.0224.50
Transactions /wp-admin/admin.php?page=wp-mtn-momo/pages/transactions.php3.0125.52
Configurations /wp-admin/admin.php?page=wp-mtn-momo/pages/configurations.php3.0330.25

Server storage [IO: ▲0.06MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: 3 new tables, 1 new option
New tables
wp_mtn_momo_configurations
wp_mtn_momo_tokens
wp_mtn_momo_transactions
New WordPress options
mtn_momo_db_version

Browser metrics Passed 4 tests

A check of browser resources used by MTN MOMO
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲10615.89 ▲0.397.40 ▼0.3646.53 ▼2.27
Dashboard /wp-admin2,966 ▲1136.05 ▲0.17147.86 ▲18.58107.03 ▲5.96
Posts /wp-admin/edit.php2,745 ▲392.70 ▲0.0063.38 ▼3.7593.86 ▼1.00
Add New Post /wp-admin/post-new.php1,602 ▲12117.18 ▼1.33351.75 ▼11.27105.15 ▲1.40
Media Library /wp-admin/upload.php1,814 ▲425.00 ▲0.00137.01 ▼33.29114.03 ▼0.97
Sandbox /wp-admin/admin.php?page=wp-mtn-momo/pages/sandbox.php1,1762.3859.0756.01
Transactions /wp-admin/admin.php?page=wp-mtn-momo/pages/transactions.php1,2542.0857.3874.60
Configurations /wp-admin/admin.php?page=wp-mtn-momo/pages/configurations.php1,5782.0963.7882.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_mtn_momo_tokens
    • wp_mtn_momo_transactions
    • wp_mtn_momo_configurations

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-mtn-momo/pages/transactions.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-mtn-momo/pages/transactions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-mtn-momo/pages/configurations.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-mtn-momo/wp-mtn-momo.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-mtn-momo/pages/sandbox.php:74

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

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

wp-mtn-momo/wp-mtn-momo.php 92% from 13 tests

"MTN MOMO" version 0.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.6.20" instead of "5.3.6")

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
Success! There were no dangerous files found in this plugin1,041 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP173273031,001
JavaScript118640
CSS1010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.88
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods39
▷ Static methods512.82%
▷ Public methods3692.31%
▷ Protected methods37.69%
▷ Private methods00.00%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin