Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲5.44MB] [CPU: ▲29.12ms] 75% from 4 tests
Server-side resources used by Payment gateway per Product for WooCommerce
Please fix the following
- Extra RAM: Extra memory usage should kept under 5MB (currently 5.44MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.29 ▲5.82 | 72.84 ▲30.60 |
Dashboard /wp-admin | 9.31 ▲6.00 | 76.20 ▲23.91 |
Posts /wp-admin/edit.php | 9.31 ▲5.95 | 86.27 ▲38.81 |
Add New Post /wp-admin/post-new.php | 9.86 ▲3.97 | 126.98 ▲30.35 |
Media Library /wp-admin/upload.php | 9.31 ▲6.08 | 67.44 ▲31.60 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 9.31 | 59.19 |
Server storage [IO: ▲3.68MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 270 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
fs_debug_mode |
fs_accounts |
fs_active_plugins |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Payment gateway per Product for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲45 | 14.34 ▲0.09 | 1.97 ▲0.04 | 29.38 ▼16.26 |
Dashboard /wp-admin | 2,215 ▲38 | 5.63 ▲0.03 | 95.00 ▲2.83 | 39.30 ▼5.27 |
Posts /wp-admin/edit.php | 2,121 ▲21 | 1.97 ▼0.05 | 40.77 ▲4.65 | 39.25 ▲3.85 |
Add New Post /wp-admin/post-new.php | 1,531 ▼6 | 23.04 ▲4.66 | 643.80 ▼5.11 | 53.63 ▼13.32 |
Media Library /wp-admin/upload.php | 1,417 ▲17 | 4.18 ▼0.01 | 100.11 ▼6.43 | 47.01 ▲0.35 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 1,072 | 1.70 | 23.64 | 29.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/woocommerce-product-payments/freemius/includes/class-freemius.php+8515
Undefined property: stdClass::$plugins
- The uninstall procedure has failed, leaving 9 options in the database
- db_upgraded
- widget_recent-posts
- fs_debug_mode
- fs_active_plugins
- widget_theysaidso_widget
- fs_accounts
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/woocommerce-product-payments/inc/per_tags.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/woocommerce-product-payments/inc/per_categories.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots lack descriptions #4, #5, #6, #7, #8, #9 in woocommerce-product-payments/assets to your readme.txt
woocommerce-product-payments/woocommerce-product-payments.php 85% from 13 tests
The entry point to "Payment gateway per Product for WooCommerce" version 3.2.9 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Domain Path: The domain path folder does not exist ("/languages")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin44,449 lines of code in 212 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 121 | 8,077 | 17,316 | 34,000 |
JavaScript | 70 | 2,584 | 818 | 9,738 |
CSS | 17 | 82 | 1 | 578 |
PO File | 3 | 30 | 66 | 117 |
XML | 1 | 3 | 0 | 16 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 93.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,088.00 |
Average method complexity | 4.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 48 | |
▷ Abstract classes | 2 | 4.17% |
▷ Concrete classes | 46 | 95.83% |
▷ Final classes | 0 | 0.00% |
Methods | 1,259 | |
▷ Static methods | 198 | 15.73% |
▷ Public methods | 869 | 69.02% |
▷ Protected methods | 17 | 1.35% |
▷ Private methods | 373 | 29.63% |
Functions | 131 | |
▷ Named functions | 131 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 146 | |
▷ Global constants | 99 | 67.81% |
▷ Class constants | 47 | 32.19% |
▷ Public constants | 47 | 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
11 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/pgpp1.png | 6.76KB | 6.76KB | 0.00% |
img/pgpp2.png | 28.30KB | 11.43KB | ▼ 59.61% |
img/close-icon.png | 1.09KB | 1.00KB | ▼ 7.55% |
freemius/assets/img/dfm-payment-gateway-per-product-for-woocommerce.png | 3.12KB | 2.85KB | ▼ 8.43% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |