89% mpower-woocommerce-payment-gateway

Code Review | MPower Woocommerce Payment Gateway

WordPress plugin MPower Woocommerce Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: mpower-woocommerc...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Jan 15, 2016
  • Number of updates: 17
  • Update frequency: every 39.0 days
  • Top authors: elnino.akin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,128 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.54ms] Passed 4 tests

An overview of server-side resources used by MPower Woocommerce Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.21 ▼2.00
Dashboard /wp-admin3.31 ▲0.0042.77 ▼17.59
Posts /wp-admin/edit.php3.36 ▲0.0046.10 ▼3.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.85 ▼2.60
Media Library /wp-admin/upload.php3.23 ▲0.0035.52 ▼0.68

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

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

Browser metrics Passed 4 tests

MPower Woocommerce Payment Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.21 ▼1.102.16 ▲0.5339.48 ▼4.35
Dashboard /wp-admin2,206 ▲184.87 ▼0.03108.79 ▼7.5239.06 ▼8.28
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0038.99 ▲3.0234.63 ▲0.77
Add New Post /wp-admin/post-new.php1,532 ▲1823.08 ▲5.50630.09 ▼82.2057.85 ▲4.96
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0393.36 ▼6.3442.86 ▼0.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt might help

mpower-woocommerce-payment-gateway/mpowerpayment-woocommere-gateway.php 92% from 13 tests

The primary PHP file in "MPower Woocommerce Payment Gateway" version 2.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mpower-woocommerce-payment-gateway.php" instead of "mpowerpayment-woocommere-gateway.php")

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
No dangerous file extensions were detected403 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15319385
JavaScript10018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods426.67%
▷ Public methods1493.33%
▷ Protected methods16.67%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png7.49KB0.46KB▼ 93.79%