Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▼8.24MB] [CPU: ▼1,719,645.89ms] Passed 4 tests
A check of server-side resources used by Calorie Calculator
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.73 ▲0.22 | 51.85 ▲7.06 |
Dashboard /wp-admin | 3.60 ▼33.45 | 55.68 ▼6,878,533.56 |
Posts /wp-admin/edit.php | 3.44 ▲0.04 | 31.95 ▼27.84 |
Add New Post /wp-admin/post-new.php | 6.18 ▲0.25 | 85.70 ▼24.29 |
Media Library /wp-admin/upload.php | 3.52 ▲0.24 | 41.39 ▲2.12 |
Add New /wp-admin/post-new.php?post_type=calculator_log | 3.56 | 49.33 |
All Calculator Logs /wp-admin/edit.php?post_type=calculator_log | 3.57 | 42.85 |
Server storage [IO: ▲4.76MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 99 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_zubaer-calorie-calculator |
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Calorie Calculator
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,832 ▲86 | 14.38 ▲1.20 | 1.96 ▼2.83 | 43.53 ▲2.18 |
Dashboard /wp-admin | 2,241 ▲64 | 5.63 ▲0.04 | 86.47 ▼1.12 | 40.35 ▲2.53 |
Posts /wp-admin/edit.php | 2,143 ▲61 | 1.98 ▼0.03 | 37.05 ▼1.74 | 31.55 ▼4.41 |
Add New Post /wp-admin/post-new.php | 1,579 ▲51 | 18.10 ▼5.11 | 635.69 ▼23.02 | 86.38 ▲35.54 |
Media Library /wp-admin/upload.php | 1,443 ▲43 | 4.12 ▲0.01 | 102.62 ▼11.19 | 43.56 ▼3.85 |
Add New /wp-admin/post-new.php?post_type=calculator_log | 1,568 | 2.68 | 60.50 | 50.22 |
All Calculator Logs /wp-admin/edit.php?post_type=calculator_log | 1,140 | 2.09 | 43.47 | 32.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options detected upon uninstall: 7 options
- widget_zubaer-calorie-calculator
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- 21 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=calculator_log
- > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
- 21 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=calculator_log
- > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
SRP 0% 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 fix the following
- 11× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/general/email_field.php
- > /wp-content/plugins/calorie-calculator/templates/widgets/calculator/bootstrap-general.php
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/general/firstname_field.php
- > /wp-content/plugins/calorie-calculator/templates/widgets/calculator/old.php
- > /wp-content/plugins/calorie-calculator/templates/widgets/calculator/general.php
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/general/height_field.php
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/old/height_field.php
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/general/weight_field.php
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/general/fullname_field.php
- > /wp-content/plugins/calorie-calculator/templates/calculator_fields/old/weight_field.php
- 88× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: unit in wp-content/plugins/calorie-calculator/templates/calculator_fields/old/height_field.php on line 13
- > PHP Notice
Trying to get property 'calcalpro' of non-object in wp-content/plugins/calorie-calculator/templates/forms/old/calorie_calculator_us_unit_form.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/calorie-calculator/templates/calculator_fields/bootstrap-general/firstname_field.php:2
- > PHP Fatal error
Uncaught Error: Call to a member function get_calculator_field() on null in wp-content/plugins/calorie-calculator/templates/forms/old/calorie_calculator_us_unit_form.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/calorie-calculator/templates/calculator_fields/bootstrap-general/submit_field.php:1
- > PHP Notice
Undefined variable: instance in wp-content/plugins/calorie-calculator/templates/widgets/calculator/general.php on line 20
- > PHP Notice
Undefined variable: unit in wp-content/plugins/calorie-calculator/templates/calculator_fields/bootstrap-general/height_field.php on line 2
- > PHP Notice
Undefined variable: first_name in wp-content/plugins/calorie-calculator/templates/calculator_fields/general/fullname_field.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/calorie-calculator/templates/calculator_fields/general/submit_field.php:1
- > PHP Notice
Undefined variable: object in wp-content/plugins/calorie-calculator/templates/forms/general/calorie_calculator_us_unit_form.php on line 6
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Screenshots: Add an image for screenshot #20 (Option to save user details in the user's Browser (Local Storage) so that they don't have to input ages, height, weight, etc. again and again.)
calorie-calculator/calorie-calculator.php 85% from 13 tests
The main file in "Calorie Calculator" v. 3.2.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 281 characters long)
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 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
There were no executable files found in this plugin5,021 lines of code in 55 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 5 | 389 | 173 | 2,069 |
PHP | 43 | 803 | 310 | 1,519 |
JavaScript | 1 | 498 | 110 | 832 |
PO File | 1 | 137 | 369 | 321 |
XML | 5 | 0 | 0 | 280 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 41.00 |
▷ Minimum class complexity | 28.00 |
▷ Maximum class complexity | 64.00 |
Average method complexity | 2.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 63 | |
▷ Static methods | 7 | 11.11% |
▷ Public methods | 63 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.00% |
Constants | 13 | |
▷ Global constants | 13 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
38 PNG files occupy 4.05MB with 2.95MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 28.11KB | 3.97KB | ▼ 85.88% |
lib/jqueryui/base/images/ui-bg_glass_75_dadada_1x400.png | 0.32KB | 0.16KB | ▼ 50.46% |
assets/screenshot-17.png | 187.46KB | 53.55KB | ▼ 71.43% |
images/icon.png | 28.11KB | 3.97KB | ▼ 85.88% |
assets/screenshot-19.png | 147.16KB | 42.76KB | ▼ 70.94% |