83% mbills-payment-getaway-for-woocommerce

Code Review | mBills Payment Gateway for WooCommerce

WordPress plugin mBills Payment Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: mbills-payment-ge...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Oct 18, 2021
  • Latest release: Oct 18, 2021
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: mbills (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /389 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.03ms] Passed 4 tests

Analyzing server-side resources used by mBills Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1335.01 ▼0.60
Dashboard /wp-admin3.43 ▲0.1247.71 ▲1.74
Posts /wp-admin/edit.php3.55 ▲0.1942.05 ▼1.54
Add New Post /wp-admin/post-new.php6.02 ▲0.1383.50 ▼3.23
Media Library /wp-admin/upload.php3.36 ▲0.1233.98 ▲1.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for mBills Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.35 ▼0.021.60 ▼0.1036.13 ▼7.56
Dashboard /wp-admin2,195 ▲185.63 ▲0.1181.66 ▼8.7735.87 ▼5.18
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.1535.29 ▼2.4431.75 ▼5.41
Add New Post /wp-admin/post-new.php1,526 ▼023.75 ▲0.28581.57 ▼50.3652.11 ▼1.04
Media Library /wp-admin/upload.php1,400 ▲34.28 ▲0.09103.54 ▲0.4145.15 ▲0.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mbills-payment-getaway-for-woocommerce/includes/payment.php:12

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 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt is a good inspiration

mbills-payment-getaway-for-woocommerce/mbills-payment-plugin.php 77% from 13 tests

The main PHP script in "mBills Payment Gateway for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • 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
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mbills-payment-getaway-for-woocommerce.php" instead of "mbills-payment-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin885 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6210153629
CSS348144
JavaScript41529112

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/icon/mBills2020_vertical_RGB.png1.61KB0.98KB▼ 38.94%
includes/icon/logo1.png2.29KB1.79KB▼ 21.83%