84% monetbil-woocommerce-gateway

Code Review | Monetbil - Mobile Money Gateway for WooCommerce

WordPress plugin Monetbil - Mobile Money Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: monetbil-woocomme...
  • Plugin version: 1.15.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.1
  • WordPress version: 6.3.1
  • First release: May 24, 2017
  • Latest release: Jun 16, 2019
  • Number of updates: 24
  • Update frequency: every 47.2 days
  • Top authors: sergentong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,002 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Monetbil - Mobile Money Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.17 ▼2.72
Dashboard /wp-admin3.40 ▲0.0945.73 ▼4.92
Posts /wp-admin/edit.php3.51 ▲0.1649.41 ▼2.26
Add New Post /wp-admin/post-new.php5.98 ▲0.0996.00 ▼13.52
Media Library /wp-admin/upload.php3.32 ▲0.0935.42 ▼1.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Monetbil - Mobile Money Gateway for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.20 ▼1.451.64 ▼0.3938.37 ▼12.65
Dashboard /wp-admin2,206 ▲244.89 ▼0.97110.21 ▼0.3538.66 ▼5.88
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0240.33 ▲4.9636.56 ▲0.23
Add New Post /wp-admin/post-new.php1,514 ▼017.63 ▲0.11670.50 ▼25.2752.41 ▼2.45
Media Library /wp-admin/upload.php1,388 ▲34.38 ▲0.2094.15 ▼20.5141.00 ▼6.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: payment_url in wp-content/plugins/monetbil-woocommerce-gateway/templates/payment-widget-v2.php on line 1
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/monetbil-woocommerce-gateway/templates/payment-widget-v1.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/monetbil-woocommerce-gateway/templates/payment-widget-v1.php:2
    • > PHP Notice
      Undefined variable: payment_url in wp-content/plugins/monetbil-woocommerce-gateway/templates/payment-widget-v1.php on line 1
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/monetbil-woocommerce-gateway/templates/payment-widget-v2.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/monetbil-woocommerce-gateway/templates/payment-widget-v2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/monetbil-woocommerce-gateway/templates/receipt.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: payment gateways, gateway, receipt, shopping cart, payment...

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

The main PHP file in "Monetbil - Mobile Money Gateway for WooCommerce" ver. 1.15.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin551 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5152229549
JavaScript2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1768.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants00.00%
▷ Class constants28100.00%
▷ Public constants28100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
monetbil-mtnmomo-logo.png11.15KB4.40KB▼ 60.53%
monetbil-mobile-payments-small-logo.png4.33KB2.84KB▼ 34.38%
monetbil_partners_logo.png13.64KB5.08KB▼ 62.78%