Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.05MB] [CPU: ▼13.68ms] Passed 4 tests
A check of server-side resources used by SodaHead Polls
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.13 | 37.28 ▼2.76 |
Dashboard /wp-admin | 3.32 ▲0.01 | 32.34 ▼16.52 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 36.07 ▼10.14 |
Add New Post /wp-admin/post-new.php | 5.57 ▼0.32 | 65.75 ▼25.31 |
Media Library /wp-admin/upload.php | 3.33 ▲0.09 | 30.42 ▼1.36 |
Templates /wp-admin/admin.php?page=sh_menu_options_templates | 3.29 | 28.32 |
Poll Edit /wp-admin/admin.php?page=sh_menu_options_poll_edit | 3.30 | 27.77 |
Polls /wp-admin/admin.php?page=sh_menu_options | 3.30 | 29.36 |
Template Edit /wp-admin/admin.php?page=sh_menu_options_template_edit | 3.30 | 28.07 |
Settings /wp-admin/admin.php?page=sh_menu_options_settings | 3.30 | 29.32 |
Server storage [IO: ▲0.15MB] [DB: ▲0.01MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 44 new files
Database: 1 new table, 10 new options
New tables |
---|
wp_sodahead_templates |
New WordPress options |
---|
widget_theysaidso_widget |
sh_secret |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
sh_action_key |
widget_foo_widget |
widget_recent-posts |
db_upgraded |
sh_default_template_id |
Browser metrics Passed 4 tests
A check of browser resources used by SodaHead Polls
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,830 ▲84 | 13.55 ▼0.75 | 1.72 ▼0.07 | 39.59 ▼5.31 |
Dashboard /wp-admin | 2,236 ▲48 | 5.83 ▲0.94 | 108.42 ▼8.81 | 70.19 ▲20.20 |
Posts /wp-admin/edit.php | 2,122 ▲33 | 2.02 ▲0.02 | 34.64 ▼2.34 | 33.03 ▼3.36 |
Add New Post /wp-admin/post-new.php | 1,562 ▲48 | 23.20 ▲5.68 | 680.06 ▲61.67 | 183.24 ▲128.49 |
Media Library /wp-admin/upload.php | 1,418 ▲30 | 4.19 ▼0.07 | 96.20 ▼2.80 | 74.69 ▲30.30 |
Templates /wp-admin/admin.php?page=sh_menu_options_templates | 940 | 2.06 | 26.62 | 27.66 |
Poll Edit /wp-admin/admin.php?page=sh_menu_options_poll_edit | 1,107 | 1.89 | 26.33 | 34.03 |
Polls /wp-admin/admin.php?page=sh_menu_options | 862 | 2.08 | 24.60 | 27.65 |
Template Edit /wp-admin/admin.php?page=sh_menu_options_template_edit | 1,536 | 1.85 | 25.37 | 30.38 |
Settings /wp-admin/admin.php?page=sh_menu_options_settings | 1,398 | 6.84 | 197.61 | 38.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie tables were found after uninstall: 1 table
- wp_sodahead_templates
- Zombie WordPress options were found after uninstall: 10 options
- theysaidso_admin_options
- widget_theysaidso_widget
- sh_default_template_id
- widget_recent-comments
- db_upgraded
- sh_secret
- can_compress_scripts
- widget_foo_widget
- widget_recent-posts
- sh_action_key
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=sh_menu_options_settings
- > User deprecated in wp-includes/functions.php+5828
Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=sh_menu_options_poll_edit
- > Notice in wp-content/plugins/sodahead-polls/poll.php+11
Undefined index: poll_id
- > GET request to /wp-admin/admin.php?page=sh_menu_options_template_edit
- > Notice in wp-content/plugins/sodahead-polls/template.php+8
Undefined index: template_id
- > GET request to /wp-admin/admin.php?page=sh_menu_options_template_edit
- > Notice in wp-content/plugins/sodahead-polls/template.php+11
Undefined index: title
- > GET request to /wp-admin/admin.php?page=sh_menu_options_template_edit
- > Notice in wp-content/plugins/sodahead-polls/template.php+29
Undefined index: default_template
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=sh_menu_options_settings
- > Notice in wp-content/plugins/sodahead-polls/include/sodahead_settings.php+13
Undefined variable: message
- > GET request to /wp-admin/admin.php?page=sh_menu_options_template_edit
- > Notice in wp-content/plugins/sodahead-polls/include/sodahead_template_edit.php+39
Trying to get property 'name' of non-object
- > GET request to /wp-admin/admin.php?page=sh_menu_options_template_edit
- > Notice in wp-content/plugins/sodahead-polls/include/sodahead_template_edit.php+44
Trying to get property 'template' of non-object
- > GET request to /wp-admin/admin.php?page=sh_menu_options_template_edit
- > Notice in wp-content/plugins/sodahead-polls/include/sodahead_template_edit.php+62
Trying to get property 'display_results' of non-object
- > GET request to /wp-admin/admin.php?page=sh_menu_options_settings
- > Notice in wp-content/plugins/sodahead-polls/settings.php+8
Undefined index: submit
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/sodahead-polls/include/sodahead_templates.php
- 56× 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/sodahead-polls/include/sodahead_manage_polls.php:54
- > PHP Notice
Undefined variable: SODAHEAD_ROOT in wp-content/plugins/sodahead-polls/include/sodahead_delete.php on line 22
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sodahead-polls/include/sodahead_widget_js.php:14
- > PHP Notice
Trying to get property 'id' of non-object in wp-content/plugins/sodahead-polls/include/sodahead_widget.php on line 45
- > PHP Notice
Undefined variable: template in wp-content/plugins/sodahead-polls/include/sodahead_widget.php on line 58
- > PHP Fatal error
Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/sodahead-polls/include/sodahead_delete.php:25
- > PHP Notice
Undefined variable: is_new_template in wp-content/plugins/sodahead-polls/include/sodahead_edit_template.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/sodahead-polls/include/sodahead_delete_poll.php:8
- > PHP Notice
Undefined variable: is_new_template in wp-content/plugins/sodahead-polls/include/sodahead_template_edit.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sodahead-polls/include/sodahead_widget.php:60
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=sh_menu_options_poll_edit
- > Network (severe)
http://d6fekxp9qbg3b.cloudfront.net/js/polls/widget-v1.js?ver=1.0 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
- > GET request to /wp-admin/admin.php?page=sh_menu_options_poll_edit
- > Network (severe)
http://partners.sodahead.com/api/polls/0/?jsonp=json_pafc11b9a_2afc_50ce_440e_a328184aebf6 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
- > GET request to /wp-admin/admin.php?page=sh_menu_options
- > Network (severe)
http://partners.sodahead.com/api/polls/author/undefined/?page=1&jsonp=json_p6dd7f4d4_ce46_75e6_7231_24a678d2d388 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
- > GET request to /wp-admin/admin.php?page=sh_menu_options_settings
- > Other (severe) in unknown
chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
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
8 plugin tags: poll, vote, wp polls, polling, sodahead...
sodahead-polls/main.php 92% from 13 tests
This is the main PHP file of "SodaHead Polls" version 3.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("sodahead-polls.php" instead of "main.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,193 lines of code in 37 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 26 | 78 | 224 | 2,423 |
JavaScript | 4 | 50 | 33 | 605 |
CSS | 1 | 7 | 0 | 110 |
HTML | 6 | 0 | 0 | 55 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 19.00 |
▷ Minimum class complexity | 19.00 |
▷ Maximum class complexity | 19.00 |
Average method complexity | 4.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 1 | 20.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 25 | |
▷ Named functions | 25 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/icon.png | 0.42KB | 0.64KB | 0.00% |
img/close.png | 0.59KB | 0.33KB | ▼ 44.32% |
img/dailypoll.png | 0.61KB | 0.48KB | ▼ 20.45% |
img/logo.png | 1.23KB | 1.63KB | 0.00% |
img/button.png | 0.41KB | 0.65KB | 0.00% |