84% woocommerce-mpay24-gateway

Code Review | WooCommerce mPAY24 Gateway

WordPress plugin WooCommerce mPAY24 Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-mpay2...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2012
  • Latest release: Dec 5, 2016
  • Number of updates: 34
  • Update frequency: every 42.9 days
  • Top authors: datenwerk (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,169 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.82ms] Passed 4 tests

A check of server-side resources used by WooCommerce mPAY24 Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1149.12 ▲6.54
Dashboard /wp-admin3.41 ▲0.1148.81 ▼3.89
Posts /wp-admin/edit.php3.53 ▲0.1752.09 ▼0.65
Add New Post /wp-admin/post-new.php6.00 ▲0.1199.75 ▼7.68
Media Library /wp-admin/upload.php3.34 ▲0.1136.78 ▲0.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 119 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce mPAY24 Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.081.75 ▲0.0941.34 ▼4.26
Dashboard /wp-admin2,192 ▲155.59 ▼0.0585.68 ▼13.0739.45 ▲0.23
Posts /wp-admin/edit.php2,100 ▼01.96 ▲0.0134.08 ▼4.7632.12 ▼1.59
Add New Post /wp-admin/post-new.php1,526 ▼1523.24 ▲0.04654.94 ▼32.3958.51 ▼5.99
Media Library /wp-admin/upload.php1,400 ▲64.19 ▲0.0198.26 ▼11.7440.60 ▼7.12

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woocommerce-mpay24-gateway/admin/gateway-mpay24-install.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

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

The main file in "WooCommerce mPAY24 Gateway" v. 1.5.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-mpay24-gateway.php" instead of "gateway-mpay24.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 detected25,375 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript362,3832,55110,073
HTML22889667,187
CSS7113355,012
PHP65891,1062,190
XSD100580
PO File194142242
SVG11191

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.75
▷ Minimum class complexity4.00
▷ Maximum class complexity90.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods169
▷ Static methods00.00%
▷ Public methods15289.94%
▷ Protected methods42.37%
▷ Private methods137.69%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
MPay24/doc/img/apple-touch-icon-72x72.png12.45KB5.26KB▼ 57.74%
MPay24/doc/img/icons/visibility_public.png3.37KB0.89KB▼ 73.57%
MPay24/doc/img/icons/icon-folder-open-big.png0.23KB0.25KB0.00%
MPay24/doc/img/iviewer/iviewer.rotate_right.png1.45KB1.46KB0.00%
MPay24/doc/img/icons/constant.png0.48KB0.41KB▼ 14.72%