Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼1.04ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce MyChoice2Pay Payment Gateway
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.06 | 40.85 ▼1.06 |
Dashboard /wp-admin | 3.40 ▲0.06 | 49.27 ▼3.94 |
Posts /wp-admin/edit.php | 3.52 ▲0.12 | 53.24 ▲4.18 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.06 | 104.84 ▼1.02 |
Media Library /wp-admin/upload.php | 3.33 ▲0.06 | 39.32 ▲1.88 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by WooCommerce MyChoice2Pay Payment Gateway
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲43 | 14.34 ▼0.21 | 1.83 ▲0.20 | 47.89 ▲4.24 |
Dashboard /wp-admin | 2,195 ▲15 | 5.57 ▼0.05 | 91.01 ▲4.66 | 43.91 ▼2.22 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.02 ▲0.07 | 40.03 ▲3.11 | 35.60 ▼0.49 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.10 ▼0.18 | 660.22 ▼25.30 | 60.62 ▲8.88 |
Media Library /wp-admin/upload.php | 1,394 ▼9 | 4.18 ▼0.05 | 101.03 ▲1.91 | 44.83 ▼1.74 |
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
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
Smoke tests Passed 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 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
Looking good! No server-side errors or output on direct access of PHP files
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% 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
10 plugin tags: gateway, bitcoin, divvy, payments, credit card...
woo-gateway-mc2p/wc_gateway_mc2p.php 77% from 13 tests
The main PHP script in "WooCommerce MyChoice2Pay Payment Gateway" version 1.2.4 is automatically included on every request by WordPress
You should first fix the following items:
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
- Main file name: Name the main plugin file the same as the plugin slug ("woo-gateway-mc2p.php" instead of "wc_gateway_mc2p.php")
- Domain Path: The domain path folder does not exist ("/i18n/languages/")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,307 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 280 | 730 | 1,230 |
PO File | 1 | 23 | 0 | 64 |
Markdown | 1 | 12 | 0 | 13 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.15 |
Average class complexity | 2.03 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 1.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 59 | |
▷ Abstract classes | 1 | 1.69% |
▷ Concrete classes | 58 | 98.31% |
▷ Final classes | 0 | 0.00% |
Methods | 125 | |
▷ Static methods | 1 | 0.80% |
▷ Public methods | 112 | 89.60% |
▷ Protected methods | 6 | 4.80% |
▷ Private methods | 7 | 5.60% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 10 | 100.00% |
▷ Public constants | 10 | 100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icons/mc2p.png | 2.96KB | 2.00KB | ▼ 32.50% |