Making WordPress.org

Opened 5 months ago

Last modified 4 months ago

#2606 assigned defect

Inaccurate plugin rating counts

Reported by: svenl77 Owned by: Otto42
Milestone: Plugin Directory v3.0 Priority: normal
Component: Plugin Directory Keywords: needs-patch


I found a wired behave in the new plugin directory. Deleted spam reviews still get counted

Example: https://wordpress.org/plugins/bp-wc-vendors/ the two 1 star have been deleted but still get count

Change History (5)

#1 @netweb
5 months ago

  • Keywords needs-patch added
  • Summary changed from Deleted spam reviews still get counted to Inaccurate plugin rating counts

Welcome to Trac and thanks for the ticket @svenl77

To clarify things a little further, currently there are two 5 star reviews, and three 1 star reviews that have been "archived". The plugin page shows two 5 star reviews and two 1 star reviews, it should show only the two published 5 star ratings, the same as the reviews page.

This is also only an issue on the plugin page: https://wordpress.org/plugins/bp-wc-vendors/

  • https://cldup.com/TGqDzKEcVe.png

The plugin correctly only shows only the two 5 star reviews on the review page: https://wordpress.org/support/plugin/bp-wc-vendors/reviews/

  • https://cldup.com/O0x6B4bm_s.png

#2 @Otto42
5 months ago

  • Owner set to Otto42
  • Status changed from new to assigned

This is because the get_star_rating function is using the post_meta, when it should be calling the existing and centralized ratings code to get the information correctly. Said ratings code also contains the necessaries to create the HTML for the bars, so some simple de-duplication of code should fix this.

This ticket was mentioned in Slack in #meta by ipstenu. View the logs.

4 months ago

#4 @keraweb
4 months ago

What is the status for this issue? I have the same thing with one of my plugins. The WP.org API returns the archived/spammed reviews as well.

This ticket was mentioned in Slack in #meta by dd32. View the logs.

4 months ago

Note: See TracTickets for help on using tickets.