Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲5.36MB] [CPU: ▲36.96ms] 75% from 4 tests
Server-side resources used by YASR - Yet Another Star Rating Plugin for WordPress
Please take the time to fix the following items
- Extra RAM: Extra memory usage must be kept under 5MB (currently 5.36MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.92 ▲5.45 | 68.00 ▲26.43 |
Dashboard /wp-admin | 8.94 ▲5.63 | 82.71 ▲33.89 |
Posts /wp-admin/edit.php | 8.94 ▲5.58 | 87.97 ▲40.97 |
Add New Post /wp-admin/post-new.php | 10.65 ▲4.76 | 133.42 ▲46.55 |
Media Library /wp-admin/upload.php | 8.94 ▲5.71 | 80.42 ▲47.92 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 8.94 | 66.73 |
Server storage [IO: ▲5.49MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 371 new files
Database: 4 new tables, 16 new options
New tables |
---|
wp_yasr_multi_set |
wp_yasr_multi_set_fields |
wp_yasr_log_multi_set |
wp_yasr_log |
New WordPress options |
---|
db_upgraded |
yasr_general_options |
theysaidso_admin_options |
fs_active_plugins |
yasr_style_options |
widget_yasr_overall_rating_widget |
widget_yasr_visitor_votes_widget |
yasr_multiset_options |
can_compress_scripts |
widget_recent-comments |
... |
Browser metrics Passed 4 tests
A check of browser resources used by YASR - Yet Another Star Rating Plugin for WordPress
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,908 ▲146 | 13.52 ▼0.82 | 1.66 ▼0.15 | 32.00 ▼14.99 |
Dashboard /wp-admin | 2,304 ▲124 | 5.60 ▼0.00 | 100.98 ▲4.92 | 54.69 ▲12.02 |
Posts /wp-admin/edit.php | 2,150 ▲50 | 2.07 ▲0.06 | 40.99 ▲0.17 | 39.97 ▲4.01 |
Add New Post /wp-admin/post-new.php | 2,560 ▲1,034 | 25.67 ▲2.77 | 744.04 ▲75.63 | 56.10 ▲2.33 |
Media Library /wp-admin/upload.php | 1,439 ▲39 | 4.15 ▼0.07 | 97.88 ▼11.44 | 44.71 ▼0.29 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,101 | 1.65 | 25.16 | 26.90 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/yet-another-stars-rating/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- The plugin did not uninstall successfully, leaving 4 tables in the database
- wp_yasr_multi_set
- wp_yasr_log
- wp_yasr_multi_set_fields
- wp_yasr_log_multi_set
- Zombie WordPress options detected upon uninstall: 16 options
- widget_yasr_visitor_votes_widget
- theysaidso_admin_options
- yasr-version
- yasr_style_options
- fs_active_plugins
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- yasr_general_options
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 46× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
- > /wp-content/plugins/yet-another-stars-rating/includes/classes/YasrCustomPostTypes.php
- > /wp-content/plugins/yet-another-stars-rating/includes/shortcodes/classes/YasrVisitorVotes.php
- > /wp-content/plugins/yet-another-stars-rating/admin/classes/YasrEditCategory.php
- > /wp-content/plugins/yet-another-stars-rating/admin/settings/classes/YasrSettingsRankings.php
- > /wp-content/plugins/yet-another-stars-rating/admin/yasr-admin-init.php
- > /wp-content/plugins/yet-another-stars-rating/admin/settings/classes/YasrImportRatingPlugins.php
- > /wp-content/plugins/yet-another-stars-rating/includes/shortcodes/classes/YasrNoStarsRankings.php
- > /wp-content/plugins/yet-another-stars-rating/admin/editor/YasrMetaboxBelowEditor.php
- > /wp-content/plugins/yet-another-stars-rating/admin/editor/YasrEditorHooks.php
- > /wp-content/plugins/yet-another-stars-rating/includes/shortcodes/classes/YasrOverallRating.php
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'Gamajo_Template_Loader' not found in wp-content/plugins/yet-another-stars-rating/includes/classes/YasrTemplateLoader.php:7
- > PHP Fatal error
Uncaught Error: Class 'YasrShortcode' not found in wp-content/plugins/yet-another-stars-rating/includes/shortcodes/classes/YasrDisplayPosts.php:16
- > PHP Warning
require_once(wp-content/plugins/yet-another-stars-rating/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in wp-content/plugins/yet-another-stars-rating/vendor/autoload.php on line 23
- > PHP Warning
file_get_contents(docs/yasr_hooks.md): failed to open stream: No such file or directory in wp-content/plugins/yet-another-stars-rating/docs/fix_yasr_hooks_path.php on line 8
- > PHP Warning
file_put_contents(docs/yasr_hooks.md): failed to open stream: No such file or directory in wp-content/plugins/yet-another-stars-rating/docs/fix_yasr_hooks_path.php on line 14
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/yet-another-stars-rating/vendor/composer/autoload_real.php' (include_path='.:/usr/share/php') in wp-content/plugins/yet-another-stars-rating/vendor/autoload.php on line 23
- > PHP Fatal error
Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/yet-another-stars-rating/templates/content.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 93% 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: Please describe screenshot #6 in yet-another-stars-rating/assets to your readme.txt
yet-another-stars-rating/yet-another-stars-rating.php 92% from 13 tests
"YASR - Yet Another Star Rating Plugin for WordPress" version 3.4.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin53,658 lines of code in 269 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 180 | 10,757 | 22,990 | 43,941 |
JavaScript | 48 | 840 | 1,006 | 3,734 |
PO File | 3 | 1,159 | 1,416 | 2,798 |
CSS | 18 | 349 | 70 | 1,480 |
SVG | 8 | 1 | 2 | 900 |
Markdown | 3 | 280 | 0 | 502 |
JSON | 8 | 0 | 0 | 217 |
HTML | 1 | 14 | 1 | 86 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.54 |
Average class complexity | 57.79 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 95 | |
▷ Abstract classes | 3 | 3.16% |
▷ Concrete classes | 92 | 96.84% |
▷ Final classes | 0 | 0.00% |
Methods | 1,746 | |
▷ Static methods | 298 | 17.07% |
▷ Public methods | 1,254 | 71.82% |
▷ Protected methods | 48 | 2.75% |
▷ Private methods | 444 | 25.43% |
Functions | 155 | |
▷ Named functions | 132 | 85.16% |
▷ Anonymous functions | 23 | 14.84% |
Constants | 230 | |
▷ Global constants | 183 | 79.57% |
▷ Class constants | 47 | 20.43% |
▷ Public constants | 47 | 100.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
51 PNG files occupy 0.93MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/img/stars/thumb/6fork_second.png | 1.36KB | 1.38KB | 0.00% |
includes/img/stars/thumb/1rater.png | 1.07KB | 1.54KB | 0.00% |
includes/img/yasr-multi-set-insert-rating.png | 124.83KB | 54.94KB | ▼ 55.99% |
includes/img/stars/thumb/24joy.png | 31.54KB | 18.17KB | ▼ 42.39% |
includes/img/stars/thumb/11camera.png | 29.28KB | 16.16KB | ▼ 44.82% |