Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/weighty-vote/class.weightyvote_widget.php+9
Methods with the same name as their class will not be constructors in a future version of PHP; weightyvote_widget has a deprecated constructor
Server metrics [RAM: ▼1.81MB] [CPU: ▼219.03ms] Passed 4 tests
A check of server-side resources used by Vote widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.82 ▼0.90 | 4.70 ▼15.44 |
Dashboard /wp-admin | 1.84 ▼1.22 | 6.58 ▼39.08 |
Posts /wp-admin/edit.php | 1.84 ▼1.27 | 5.84 ▼36.60 |
Add New Post /wp-admin/post-new.php | 1.84 ▼3.60 | 5.16 ▼773.68 |
Media Library /wp-admin/upload.php | 1.84 ▼1.16 | 5.22 ▼26.76 |
Weighty Vote /wp-admin/options-general.php?page=weightyvote_settings | 1.84 | 5.38 |
Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_weightyvote_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Vote widget
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,846 ▲251 | 16.35 ▲0.88 | 12.86 ▲0.81 | 45.11 ▲2.17 |
Dashboard /wp-admin | 2,985 ▲54 | 6.17 ▲0.08 | 157.26 ▼9.40 | 107.82 ▲5.15 |
Posts /wp-admin/edit.php | 2,755 ▲16 | 2.73 ▲0.00 | 70.17 ▼1.36 | 90.10 ▲0.91 |
Add New Post /wp-admin/post-new.php | 1,697 ▲189 | 18.47 ▼0.40 | 371.96 ▼107.24 | 116.60 ▲6.69 |
Media Library /wp-admin/upload.php | 1,826 ▲16 | 5.06 ▲0.03 | 135.71 ▼19.37 | 116.01 ▼0.47 |
Weighty Vote /wp-admin/options-general.php?page=weightyvote_settings | 1,017 | 2.52 | 58.23 | 60.99 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/weighty-vote/class.weightyvote_widget.php+9
Methods with the same name as their class will not be constructors in a future version of PHP; weightyvote_widget has a deprecated constructor
- The uninstall procedure has failed, leaving 1 option in the database
- widget_weightyvote_widget
Smoke tests 50% 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
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > Deprecated in wp-content/plugins/weighty-vote/class.weightyvote_widget.php+9
Methods with the same name as their class will not be constructors in a future version of PHP; weightyvote_widget has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > User deprecated in wp-includes/functions.php+5304
The called constructor method for WP_Widget in weightyvote_widget is deprecated since version 4.3.0! Use __construct() instead.
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > Deprecated in wp-includes/class-wp-hook.php+303
Non-static method weightyvote_admin::init() should not be called statically
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > Deprecated in wp-includes/class-wp-hook.php+303
Non-static method weightyvote_admin::create_menu() should not be called statically
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > Deprecated in wp-includes/class-wp-hook.php+303
Non-static method weightyvote_admin::show_settings_page() should not be called statically
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > Deprecated in wp-content/plugins/weighty-vote/views/class.weightyvote_settings.php+8
Methods with the same name as their class will not be constructors in a future version of PHP; weightyvote_settingsView has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > Deprecated in wp-content/plugins/weighty-vote/views/class.weightyvote_select.php+8
Methods with the same name as their class will not be constructors in a future version of PHP; weightyvote_selectView has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=weightyvote_settings
- > User notice in wp-includes/functions.php+5663
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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 5× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/weighty-vote/class.weightyvote_widget.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/weighty-vote/weightyvote.php:35
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/weighty-vote/views/templates/select.php:1
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/weighty-vote/views/templates/vote.php:1
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/weighty-vote/views/templates/change.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: These screenshots lack descriptions #2, #3 in weighty-vote/assets to your readme.txt
weighty-vote/weightyvote.php 85% from 13 tests
The main file in "Vote widget" v. 1.0 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:
- Main file name: Name the main plugin file the same as the plugin slug ("weighty-vote.php" instead of "weightyvote.php")
- 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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,675 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 9 | 408 | 219 | 2,160 |
PHP | 11 | 121 | 408 | 689 |
CSS | 2 | 41 | 32 | 439 |
SVG | 1 | 0 | 0 | 288 |
PO File | 1 | 42 | 47 | 98 |
HTML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 6.71 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 1.98 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 41 | |
▷ Static methods | 21 | 51.22% |
▷ Public methods | 24 | 58.54% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 17 | 41.46% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 15 | |
▷ Global constants | 15 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected