Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/sn-rating/sn_rating.php+296
Function create_function() is deprecated
Server metrics [RAM: ▼1.49MB] [CPU: ▼50.69ms] Passed 4 tests
This is a short check of server-side resources used by SN Rating
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.49 ▼0.97 | 6.90 ▼33.50 |
Dashboard /wp-admin | 2.51 ▼0.79 | 9.76 ▼38.44 |
Posts /wp-admin/edit.php | 2.51 ▼0.84 | 8.47 ▼45.26 |
Add New Post /wp-admin/post-new.php | 2.51 ▼3.37 | 8.05 ▼85.55 |
Media Library /wp-admin/upload.php | 2.51 ▼0.72 | 8.84 ▼29.38 |
Rating Settings /wp-admin/options-general.php?page=rating_options | 2.52 | 8.71 |
Server storage [IO: ▲1.29MB] [DB: ▲0.01MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 345 new files
Database: 5 new tables, 8 new options
New tables |
---|
wp_rating_factors |
wp_entity_rating_factors |
wp_rating_scores |
wp_rating_meta |
wp_admin_rating_config |
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
widget_rating_widget |
widget_theysaidso_widget |
rating_db_version |
Browser metrics Passed 4 tests
This is an overview of browser requirements for SN Rating
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,964 ▲178 | 13.73 ▼0.55 | 10.11 ▲7.08 | 38.08 ▼3.00 |
Dashboard /wp-admin | 2,232 ▲55 | 5.83 ▲0.17 | 85.78 ▼0.29 | 79.37 ▲43.23 |
Posts /wp-admin/edit.php | 2,149 ▲52 | 2.44 ▲0.48 | 35.64 ▼1.17 | 37.05 ▲0.21 |
Add New Post /wp-admin/post-new.php | 1,570 ▲42 | 23.24 ▲0.14 | 626.37 ▼70.32 | 38.59 ▼23.99 |
Media Library /wp-admin/upload.php | 1,446 ▲52 | 4.51 ▲0.37 | 95.06 ▼7.78 | 45.67 ▼0.37 |
Rating Settings /wp-admin/options-general.php?page=rating_options | 1,004 | 1.72 | 29.82 | 35.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin cannot be uninstalled
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rating-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- The uninstall procedure failed, leaving 1 table in the database
- wp_rating_scores
- The uninstall procedure has failed, leaving 8 options in the database
- rating_db_version
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_rating_widget
Smoke tests 25% 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)
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rating-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rating handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-lightness handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-datepicker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=rating_options
- > Deprecated in wp-content/plugins/sn-rating/sn_rating.php+296
Function create_function() is deprecated
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the sn_rating handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the sn_rating handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=rating_options
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method RatingWidget::register_my_widget() should not be called statically
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=rating_options
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
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
Almost there! Just fix the following items
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sn-rating/rating_html.php:99
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sn-rating/rating_html.php:99
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sn-rating/widget.php:3
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/sn-rating/ajax-entity-rating.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sn-rating/ajax-rating.php:47
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
- > GET request to /wp-admin/options-general.php?page=rating_options
- > Javascript (severe) in unknown
/wp-content/plugins/sn-rating/scripts/rating.js?ver=6.3.1 9:69 Uncaught TypeError: jQuery(...).live is not a function
- > GET request to /wp-admin/options-general.php?page=rating_options
- > Javascript (severe) in unknown
/wp-content/plugins/sn-rating/scripts/admin-rating.js?ver=6.3.1 30:29 Uncaught TypeError: jQuery(...).live is not a function
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #17 (BuddyPressMedia - Detail View), #18 (BuddyPressMedia - Popup View), #19 (BuddyPressMedia - Activity View)
- Donate link: Please fix this invalid URI: ""
sn-rating/sn_rating.php 92% from 13 tests
Analyzing the main PHP file in "SN Rating" version 1.4.7
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("sn-rating.php" instead of "sn_rating.php")
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 plugin8,765 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 374 | 565 | 7,033 |
CSS | 3 | 81 | 53 | 1,530 |
JavaScript | 2 | 14 | 9 | 114 |
HTML | 1 | 3 | 0 | 88 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 30.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 118.00 |
Average method complexity | 6.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 41.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 46 | |
▷ Static methods | 1 | 2.17% |
▷ Public methods | 43 | 93.48% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 6.52% |
Functions | 16 | |
▷ Named functions | 16 | 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 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
68 PNG files occupy 0.87MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-8.png | 10.93KB | 5.80KB | ▼ 46.95% |
screenshots/demographic-step-1.png | 36.44KB | 14.17KB | ▼ 61.10% |
screenshots/assign_rating.png | 41.66KB | 14.44KB | ▼ 65.35% |
images/black-dot.png | 0.34KB | 0.37KB | 0.00% |
screenshot-7.png | 12.38KB | 6.38KB | ▼ 48.47% |