Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/wp-calc-weight/includes/functions.php+9
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Server metrics [RAM: ▼2.19MB] [CPU: ▼60.01ms] Passed 4 tests
An overview of server-side resources used by Wp Calc Weight
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.07 ▼1.66 | 4.48 ▼42.32 |
Dashboard /wp-admin | 2.09 ▼1.47 | 5.71 ▼53.22 |
Posts /wp-admin/edit.php | 2.09 ▼1.59 | 5.36 ▼47.15 |
Add New Post /wp-admin/post-new.php | 2.09 ▼4.06 | 7.18 ▼97.35 |
Media Library /wp-admin/upload.php | 2.09 ▼1.40 | 5.80 ▼30.03 |
Settings /wp-admin/admin.php?page=calc_weight | 2.09 | 5.07 |
FAQ /wp-admin/admin.php?page=calc_weight_faq | 2.09 | 5.92 |
What's new /wp-admin/admin.php?page=calc_weight_whats_new | 2.09 | 5.89 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 10 new options
New WordPress options |
---|
wp-calc-weight-round_up_calc |
wp-calc-weight-meas_system |
theysaidso_admin_options |
wp-calc-weight-opt_version |
widget_theysaidso_widget |
db_upgraded |
wp-calc-weight-show_header |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Wp Calc Weight
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,933 ▲172 | 13.48 ▼0.89 | 8.61 ▲6.73 | 45.16 ▲1.88 |
Dashboard /wp-admin | 2,226 ▲46 | 5.67 ▲0.10 | 88.51 ▼4.28 | 43.36 ▲2.83 |
Posts /wp-admin/edit.php | 2,134 ▲34 | 2.04 ▲0.02 | 33.91 ▼2.74 | 34.65 ▼5.90 |
Add New Post /wp-admin/post-new.php | 1,570 ▲44 | 23.66 ▲6.19 | 669.67 ▼18.21 | 57.82 ▼0.04 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.22 ▲0.01 | 99.21 ▼7.66 | 44.70 ▲0.79 |
Settings /wp-admin/admin.php?page=calc_weight | 2,413 | 3.45 | 86.65 | 28.28 |
FAQ /wp-admin/admin.php?page=calc_weight_faq | 1,090 | 1.97 | 31.42 | 30.96 |
What's new /wp-admin/admin.php?page=calc_weight_whats_new | 889 | 1.98 | 29.88 | 25.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/wp-calc-weight/includes/functions.php+9
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- 12 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=calc_weight_whats_new
- > Deprecated in wp-content/plugins/wp-calc-weight/includes/functions.php+9
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+82
Undefined index: btn_reset_display
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+93
Undefined index: basic_font_size
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+98
Undefined index: basic_border_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+108
Undefined index: btn_calc_background
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+113
Undefined index: btn_calc_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+114
Undefined index: btn_calc_hover_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+120
Undefined index: btn_reset_background
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+125
Undefined index: btn_reset_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+126
Undefined index: btn_reset_hover_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+133
Undefined index: table_head_background
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+137
Undefined index: table_head_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+143
Undefined index: input_border_color
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+147
Undefined index: input_background
- > GET request to /wp-admin/admin.php?page=calc_weight
- > Notice in wp-content/plugins/wp-calc-weight/admin/settings.php+152
Undefined index: input_color
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
The following issues need your attention
- 10× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined variable: calculator in wp-content/plugins/wp-calc-weight/public/templates/public/idealweight.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-calc-weight/admin/whats_new.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-calc-weight/admin/settings.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-calc-weight/wp-calc-weight.php:34
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-calc-weight/public/templates/public/idealweight.php:6
- > PHP Notice
Undefined variable: calc_weight_front_idx in wp-content/plugins/wp-calc-weight/public/templates/public/idealweight.php on line 1
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/wp-calc-weight/public/templates/public/idealweight.php on line 3
- > PHP Notice
Undefined variable: calculator in wp-content/plugins/wp-calc-weight/public/templates/public/idealweight.php on line 4
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/wp-calc-weight/public/templates/public/idealweight.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-calc-weight/admin/faq.php:3
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: weight, health, calculator
wp-calc-weight/wp-calc-weight.php Passed 13 tests
The main PHP file in "Wp Calc Weight" ver. 0.3.2 adds more information about the plugin and also serves as the entry point for this plugin
31 characters long description:
Ideal Weight Calculator Plugin.
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
Everything looks great! No dangerous files found in this plugin3,483 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 4 | 113 | 99 | 2,563 |
PHP | 10 | 171 | 47 | 644 |
PO File | 2 | 110 | 114 | 270 |
JavaScript | 2 | 2 | 1 | 6 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 23 | |
▷ Named functions | 23 | 100.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 Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin