90% woo-mpgs

Code Review | WooCommerce MPGS

WordPress plugin WooCommerce MPGS scored90%from 54 tests.

About plugin

  • Plugin page: woo-mpgs
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: May 13, 2019
  • Latest release: Oct 7, 2022
  • Number of updates: 16
  • Update frequency: every 77.7 days
  • Top authors: alibasheer (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /15,565 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.85ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce MPGS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.94 ▼4.12
Dashboard /wp-admin3.41 ▲0.1155.37 ▼1.05
Posts /wp-admin/edit.php3.46 ▲0.1049.65 ▲1.97
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.10 ▼4.18
Media Library /wp-admin/upload.php3.33 ▲0.1036.73 ▲4.30

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce MPGS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲2714.72 ▲0.271.73 ▼0.4536.11 ▼7.67
Dashboard /wp-admin2,200 ▲235.49 ▼0.1696.56 ▲0.8742.80 ▼0.43
Posts /wp-admin/edit.php2,114 ▲141.94 ▼0.0438.28 ▼2.3838.45 ▲2.01
Add New Post /wp-admin/post-new.php1,375 ▼15317.35 ▼5.77555.89 ▼142.2535.69 ▼26.81
Media Library /wp-admin/upload.php1,408 ▲84.18 ▲0.01101.23 ▼5.2838.29 ▼4.71

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, mastercard, mpgs, payment, gateway

woo-mpgs/woo-mpgs.php Passed 13 tests

"WooCommerce MPGS" version 1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Extends WooCommerce with MasterCard Payment Gateway Services (MPGS).

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
Everything looks great! No dangerous files found in this plugin726 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15186583
PO File14444135
Markdown1208

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/mastercard.png5.71KB2.58KB▼ 54.94%