Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲5.35MB] [CPU: ▲29.33ms] 75% from 4 tests
Server-side resources used by Pay What You Want
The following require your attention
- Extra RAM: Extra memory usage should kept under 5MB (currently 5.35MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.21 ▲5.75 | 64.50 ▲24.74 |
Dashboard /wp-admin | 9.23 ▲5.93 | 70.04 ▲22.17 |
Posts /wp-admin/edit.php | 9.23 ▲5.88 | 83.20 ▲35.32 |
Add New Post /wp-admin/post-new.php | 9.72 ▲3.84 | 123.16 ▲35.57 |
Media Library /wp-admin/upload.php | 9.23 ▲6.00 | 67.03 ▲35.10 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 9.23 | 56.25 |
Server storage [IO: ▲3.10MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 191 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
fs_debug_mode |
theysaidso_admin_options |
fs_accounts |
can_compress_scripts |
fs_active_plugins |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Pay What You Want
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,914 ▲153 | 13.46 ▼1.08 | 7.72 ▲5.74 | 29.17 ▼9.91 |
Dashboard /wp-admin | 2,240 ▲65 | 5.66 ▼0.00 | 90.88 ▼4.99 | 44.99 ▲0.27 |
Posts /wp-admin/edit.php | 2,146 ▲46 | 2.15 ▲0.13 | 40.97 ▼0.18 | 41.22 ▲2.66 |
Add New Post /wp-admin/post-new.php | 1,559 ▲22 | 18.11 ▼0.40 | 617.25 ▲8.92 | 72.16 ▲8.91 |
Media Library /wp-admin/upload.php | 1,445 ▲51 | 4.22 ▼0.00 | 99.32 ▼1.86 | 44.10 ▲1.00 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 1,076 | 2.07 | 25.11 | 26.78 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/pay-what-you-want/freemius/includes/class-freemius.php+8515
Undefined property: stdClass::$plugins
- This plugin does not fully uninstall, leaving 9 options in the database
- widget_recent-posts
- fs_debug_mode
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- fs_accounts
- fs_active_plugins
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pay-what-you-want/inc/settings-page.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pay-what-you-want/inc/single-product-settings.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pay-what-you-want/inc/form.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pay-what-you-want/inc/pay-what-you-want.php:52
- > PHP Fatal error
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)
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Example 1), #2 (Settings), #3 (Example 2)
pay-what-you-want/pay-what-you-want.php 85% from 13 tests
The main file in "Pay What You Want" v. 1.0.2 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:
- Domain Path: The domain path points to a folder that does not exist ("/languages")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin33,985 lines of code in 145 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 123 | 8,129 | 17,261 | 33,436 |
JavaScript | 5 | 56 | 66 | 233 |
Markdown | 1 | 68 | 0 | 214 |
CSS | 15 | 2 | 0 | 86 |
XML | 1 | 3 | 0 | 16 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 91.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,088.00 |
Average method complexity | 4.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 49 | |
▷ Abstract classes | 2 | 4.08% |
▷ Concrete classes | 47 | 95.92% |
▷ Final classes | 0 | 0.00% |
Methods | 1,264 | |
▷ Static methods | 198 | 15.66% |
▷ Public methods | 874 | 69.15% |
▷ Protected methods | 17 | 1.34% |
▷ Private methods | 373 | 29.51% |
Functions | 119 | |
▷ Named functions | 117 | 98.32% |
▷ Anonymous functions | 2 | 1.68% |
Constants | 156 | |
▷ Global constants | 109 | 69.87% |
▷ Class constants | 47 | 30.13% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/pay-what-you-want.png | 12.71KB | 6.98KB | ▼ 45.12% |