To include the shortcode of kk Star Ratings plugin in your theme or CSS, you can make use of functions.php or style.css files.
One of the best wordpress star rating plugin to implement user rating structured data schema. kk-star-ratings that appear in Google Search results give a strong reason for users to click your article.
It is possible to display these ratings in WordPress using plugins as rich snippets.
Google shows visitor ratings in its search results.
Review rating plugins give authors of an article to leave an author review rating.
The aggregate rating is a good indication for a decent user experience. A high quality rating indicates the popularity of the page.
How to use kk Star Ratings shortcode in Custom pages and posts
Manually insert the short code at the required place. Totally disable the star rating for particular categories or pages.
Include this code in v3. Use square brackets for short code.
<kkstarratings force> or <kkratings force>
For each page or post, you can use this code. You can also use the following shortcode also.
<kkratings> and <kkstarratings>
To include the ratings in templates like single.php or footer.php, you can use the following code.
<?php if (function_exists('kk_star_ratings')) { echo kk_star_ratings(true); } ?>
or
<?php if (function_exists('kk_star_ratings')) { echo kk_star_ratings($postid); } ?>
The plugin’s rating widget is not just for show; it serves as a powerful content rating tool, allowing visitors to leave user ratings that reflect their opinions. Whether for blog articles or product pages, the article voting feature encourages users to engage more deeply with your content.
Moreover, kk Star Ratings supports comment ratings, enabling your community to rate each other’s contributions, thus adding another layer of interactivity and WordPress feedback. This feedback mechanism is invaluable for gauging the success of your content and for fostering a community atmosphere.
Incorporate kk Star Ratings into your site today and watch as it transforms a static page into a dynamic space for user interaction and engagement!
kk Star Ratings Features – Version 4.1.4
You can download this plugin and get further details. It is free to use.
1. Default user rating of 5.
2. User can give star ratings for posts or pages.
3. Amount of star ratings.
4. Structured data support.
5. The ratings are visible as google rich snippets.
6. It works with publicly accessible custom post types.
7. You can include your personal hooks for additional functionality.
8. Settings are available using the options page.
9. Globally disable/enable options page.
10. Disable star ratings on posts belonging to certain categories.
11. Star ratings on homepage, archives, posts, pages and in custom post types.
12. Control the structured data schema and type.
13. Restrict user voting per unique IP.
14. Allow guests to vote
15. Adjust the color of stars.
16. Adjust the number and amount of stars.
The main advantage of using this plugin is its rich snippets feature possible through structured data. As a visitor leaves his rating on the article, it should be visible in Google. The average of the collective visitor rating in Google SERPs.
kk Star Ratings Settings
When you update to the new version, it will ask you to subscribe to a security notification page using a service. It is not mandatory and you can skip that option if you are not particular about using it.
It has the following main 3 tabs.
1. General
2. Appearance
3. Rich Snippets
General
Status –
- Active – Check this to globally activate the star ratings. If you uncheck it, it will deactivate in the same fashion.
Strategies –
- Allow voting in archives
- Allow guests to vote
- Unique votes (based on IP address)
Manual Control
- Posts
- Pages
Once you check any of the above options, you will have manual control to embed the star ratings. This can be done using the hook echo kk_star_ratings(); which can be controlled by the theme or template.
Disable Locations
- Home page
- Archives
- Posts
- Pages
Disable Categories
You can enter the categories to exclude star ratings. The posts belonging to these categories will not display the ratings.
Default Position
- Top Left
- … Center
- Top Right
- Bottom Left
- … Center
- Bottom Right
Rich Snippets
- Using the status option you can activate/deactivate rich snippets.
- You also need to provide Structured data Context and Type.
Appearance
In this tab, you can decide the following.
- Greeting text
- Stars
- Gap
- Size
kk Star Ratings Changelog – 4.x, 3.x
Added
– Bottom margin added when bottom position in effect.
– Ability to reset ratings for individual posts/pages.
– Enable/disable star ratings for individual posts/pages.
– Take manual control of the auto embedded markup to avoid duplication when using in a template.
– Optionally allow guests to vote.
– Ratings can also be included in publicly accessible custom posts.
- Customizable gap/gutter between stars.
- Structured data in pages.
Fixed
– Google rich snippets.
– AJAX call on every load causing high CPU usage.
– Markup is now hidden under AMP.
– Assets are now enqueued when manually/forcefully loading the markup via template function.
- Unique voting now correctly forbids multiple ratings by same IP. (GitHub PR #91).
- Options are now correctly synced when installing, upgrading and activating.
- Use absolute change log links in docs.
- Special characters are now escaped in the title of structured data.
- Factory/default options are now synced on activation.
- Activation only ports the previous options if version was lower than 3.
- Relative star svg links instead of absolute links are now used in css.
Changed
– Default colors have been updated.
– Default size is now 22px instead of 24px.
– Structured data now uses ratingCount instead of reviewCount.
– Stars are now based on svg.
– Appearance has been simplified.
– Html based structured data has been replaced by json based structured data.
– kk_star_ratings_get function no longer includes the post_title key.
- It has an active user base of 80,000+ installations.
- Works with WordPress version 5.5.3
- It works on PHP version of 5.6 and above.
kk Star Ratings Problems
As we know some of the plugins make AJAX calls to the server in WordPress. This was the case in ver 2.X. As I was using the old version of this plugin, I faced the same difficulties.
The plugin was making admin-ajax.php call which caused server loading with high CPU usage time and caching optimization was not at best.
When I tested the page speed using GTMetrix with version 2.6.4, the culprit was kk Star Ratings plugin. It was making an AJAX call which took about 578ms for loading.
The fully loaded time of the page was only 1.7s with a total page size of 1.54MB and 40 requests. The GTMetrix test gave the following results.
I got D (62%) in PageSpeed Score and A(92%) in YSlow Score.
The following plugins were being used –
I was using Thesis Framework with Effectus Skin.
Performance Testing using kk Star Ratings ver 3.1.1
Though there were several plugins which required update, I only updated the kk Star Ratings plugin to ver 3.1.1.
I then cleared my Cloudflare and browser cache.
I tested the same page using GTMetrix again couple of times. In my test case I found that the AJAX call has reduced to 409ms. But the PageSpeed Score did not improve. Also the fully loaded time was now 1.9s.
So I decided to update the Thesis framework and other plugins. Purging of cache process was repeated. But still the admin-ajax.php call was taking more than 450ms.
So I decided to test another site where kk Star Ratings was installed.
It had only 2 posts and had the same older version of 2.6.4 like the previous one. I tested with that version first. This result also showed that the admin-ajax.php call was taking more than 600 ms.
So I updated the kk Star Rating plugin to ver 3.1.1 and checked the results again. But the AJAX call still persisted.
How to use kk Star Ratings plugin in AMP pages
Though the author of the plugin disabled this plugin in AMP pages, you can still enable it by applying some changes to the code. You can use the AMP for WP plugin to create AMP pages for your site.
In that plugin there is an option to input the CSS under Setting\Design\Global.
Copy the CSS of kk Star rating plugin from public\css\kk-star-ratings.css
to the AMP location mentioned above. This should display the ratings in AMP pages also.
Feature Improvements requested in kk Star Ratings
Some of the users on the plugin support page have requested additional features to be integrated into this pluigin. These include –
- Disable Star Ratings on some Pages like Privacy, Disclaimer etc.
- Improve security by reducing the calls to admin-ajax.php.
- Adding IP logs to block fake ratings
- Removal of fake ratings
- Facility to revert back to old design of ver 2.x.
- Add
kk-star-ratings.css/js
to DOM style or include in inline footer - Improve performance of the plugin
- Copy the plugin style CSS and paste manually in WordPress themes style.min.css and bundle.js
- Integration of ratings in WooCommerce archive and product pages.
Problems with kk Star Rating plugin
When users upgraded to the new version of 3.x, some of them faced issues.
1. When you downgrade the plugin from ver 3 to 2, some of them have seen an error log with message like this.
PHP Warning: in_array() expects parameter 2 to be array, boolean given in /public_html/wp-content/plugins/kk-star-ratings/index.php on line 525
The problem seem to be caused by index.php on the same line.
2. After update to 3.1.1 stars are not showing on posts and pages. The rich snippet feature is also not working for some sites.
3. The display of rating value and count is totally cluttered on some sites.
4. The star ratings on AMP pages are ugly to see. In the old version, there was no problem. But in ver 3.1.1, the star ratings are completely hidden in AMP pages.
5. There is incompatibility with some cache plugins. It conflicts with W3TC plugin from version 3.0.1 to 3.0.5. People resorted to using ver 2.6.4 to circumvent this problem.
hi,
this is Eskander,
i already use your kk rating plugin,
i need top revew post for query arugments,
so what can i show my sites in top revew post?
@eskander. Thanks for the comment. This is not a support site. You can go to the plugin page in WordPress repository and post your support question. The kk star ratings plugin development team may help. 🙂
Hi
Can i use kk rating shortcode in the elementor?
It is like any other shortcode. If you have problem, check-in with their support.
kk plugin Star Rating showing in the post but not showing in google How to fix this issue?
@kaushal. That entirely depends on Google. BTW, you need to add some Schema to the kkstar code. I will update the article.