74% mips-payment-gateway-for-woocommerce

Code Review | MiPS Payment Gateway for WooCommerce

WordPress plugin MiPS Payment Gateway for WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: mips-payment-gate...
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2022
  • Latest release: Sep 5, 2023
  • Number of updates: 37
  • Update frequency: every 7.5 days
  • Top authors: astridmips (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /926 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.62MB] [CPU: ▼55.70ms] Passed 4 tests

An overview of server-side resources used by MiPS Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.37 ▼1.106.85 ▼35.28
Dashboard /wp-admin2.39 ▼0.927.17 ▼53.07
Posts /wp-admin/edit.php2.39 ▼0.977.03 ▼42.23
Add New Post /wp-admin/post-new.php2.39 ▼3.507.29 ▼92.21
Media Library /wp-admin/upload.php2.39 ▼0.857.57 ▼28.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for MiPS Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▲0.052.41 ▲0.5442.53 ▲1.64
Dashboard /wp-admin2,197 ▲235.67 ▲0.0286.14 ▼10.0940.04 ▼2.41
Posts /wp-admin/edit.php2,102 ▲22.01 ▲0.0440.33 ▲0.4235.16 ▲1.67
Add New Post /wp-admin/post-new.php1,528 ▼023.04 ▼0.03672.55 ▼49.5854.95 ▼2.22
Media Library /wp-admin/upload.php1,399 ▼14.12 ▼0.05117.76 ▲8.9547.22 ▼1.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the plugin-name-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | 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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mips-payment-gateway-for-woocommerce/mips.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: payments, mips, online-payments, woocommerce

mips-payment-gateway-for-woocommerce/mips.php 92% from 13 tests

The primary PHP file in "MiPS Payment Gateway for WooCommerce" version 1.2.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mips-payment-gateway-for-woocommerce.php" instead of "mips.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected817 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11188814
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.67
▷ Minimum class complexity6.00
▷ Maximum class complexity17.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods4778.33%
▷ Protected methods00.00%
▷ Private methods1321.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/deffault-1.png1.84KB2.16KB0.00%
images/padlock-icon.png4.86KB1.68KB▼ 65.31%
images/mcb.png1.84KB2.16KB0.00%