Benchmarks
Plugin footprint 65% 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.01MB] [CPU: ▼14.76ms] Passed 4 tests
Analyzing server-side resources used by What I Charge
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.42 ▼0.04 | 26.52 ▼16.53 |
Dashboard /wp-admin | 3.35 ▲0.00 | 42.36 ▼16.40 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 43.53 ▼3.07 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 80.89 ▼23.02 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 35.16 ▼0.69 |
Settings /wp-admin/admin.php?page=what_i_charge_settings_menu | 3.31 | 32.02 |
What I Charge /wp-admin/admin.php?page=what_i_charge_menu | 3.09 | 27.03 |
Server storage [IO: ▲1.11MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 38 new options
New WordPress options |
---|
wdic_service_heading_color |
wdic_negative_btn_background_color |
wdic_currency_input |
wdic_submit_button_text |
db_upgraded |
wdic_check_bg_check_color |
email_error_text_label |
theysaidso_admin_options |
wdic_toggle_off_color |
success_text_label |
... |
Browser metrics Passed 4 tests
What I Charge: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,908 ▲147 | 13.53 ▼0.82 | 11.20 ▲9.59 | 42.17 ▼0.10 |
Dashboard /wp-admin | 2,223 ▲43 | 5.56 ▼0.05 | 82.05 ▼4.08 | 37.16 ▼2.92 |
Posts /wp-admin/edit.php | 2,131 ▲49 | 2.00 ▲0.01 | 35.58 ▼0.43 | 33.87 ▼1.06 |
Add New Post /wp-admin/post-new.php | 1,553 ▲27 | 22.71 ▼1.02 | 622.10 ▼35.49 | 50.00 ▼2.96 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.16 ▼0.06 | 96.26 ▼13.46 | 42.33 ▼4.49 |
Settings /wp-admin/admin.php?page=what_i_charge_settings_menu | 1,016 | 1.72 | 27.33 | 35.42 |
What I Charge /wp-admin/admin.php?page=what_i_charge_menu | 812 | 1.83 | 32.79 | 27.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- The plugin did not uninstall gracefully
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, class 'SquiggleDevWDIC\WhatICharge' does not have a method 'degregisterPlugin'
- This plugin did not uninstall successfully, leaving 38 options in the database
- wdic_drop_select_option_color
- can_compress_scripts
- wdic_service_heading_color
- wdic_affirmative_btn_background_color
- wdic_service_description_color
- wdic_drop_bg_color
- wdic_cancel_button_text
- wdic_toggle_on_color
- wdic_submit_button_text
- wdic_check_bg_check_color
- ...
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- > GET request to /wp-admin/admin.php?page=what_i_charge_menu
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/what-i-charge/views/admin_dropdown_view.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function SquiggleDevWDIC\\add_action() in wp-content/plugins/what-i-charge/plugin.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/what-i-charge/views/frontend/frontend_dropdown_view.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/what-i-charge/views/admin_edit_view.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/what-i-charge/views/admin_toggle_view.php:15
- > PHP Notice
Undefined property: stdClass::$textColor in wp-content/plugins/what-i-charge/views/admin_checkbox_view.php on line 24
- > PHP Notice
Undefined variable: checkCardColor in wp-content/plugins/what-i-charge/views/frontend/frontend_checkbox_view.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/what-i-charge/what_i_charge_frontend.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/what-i-charge/views/frontend/frontend_checkbox_view.php:6
- > PHP Notice
Undefined variable: dropCardColor in wp-content/plugins/what-i-charge/views/frontend/frontend_dropdown_view.php on line 1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 96% from 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
7 plugin tags: price generator, freelance, price, rate, charge...
what-i-charge/plugin.php 92% from 13 tests
"What I Charge" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("what-i-charge.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin6,531 lines of code in 46 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Sass | 16 | 600 | 75 | 2,693 |
CSS | 10 | 105 | 112 | 2,233 |
PHP | 14 | 323 | 25 | 1,000 |
JavaScript | 4 | 122 | 27 | 558 |
SVG | 1 | 0 | 1 | 41 |
Ruby | 1 | 6 | 13 | 6 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 58.00 |
▷ Minimum class complexity | 58.00 |
▷ Maximum class complexity | 58.00 |
Average method complexity | 4.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 35.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 15 | |
▷ Static methods | 1 | 6.67% |
▷ Public methods | 15 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.85MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
views/images/buttonOptions.png | 57.02KB | 18.54KB | ▼ 67.49% |
views/images/wdic-dropdown-arrow-black.png | 1.52KB | 1.66KB | 0.00% |
views/images/wdicDownArrow.png | 0.92KB | 1.13KB | 0.00% |
views/images/toggleOptions.png | 32.57KB | 11.54KB | ▼ 64.57% |
assets/screenshot-2.png | 332.27KB | 169.43KB | ▼ 49.01% |