Making WordPress.org

Opened 11 years ago

Closed 10 years ago

#147 closed defect (bug) (fixed)

Plugin Rating stars are incorrect

Reported by: pento's profile pento Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

Migrating from #wp22533:

The stars rating doesn't reflect the average rating correctly.

For example:
http://wordpress.org/extend/plugins/automatic-updater/

At the time of reporting, there were 13 ratings: 9*5, 3*4, 1*1, for an average of 4.46, shown correctly in the text as "4.5 out of 5 stars".

The star rating doesn't seem to be using the same number, however - it should be 89.2% (or 90%, if it uses the rounded up "4.5" as the rating), but is showing as 82%.

comment 1:

It's a width of 82 pixels (not percentage) because it is out of 92 pixels. It might look slightly off because of the way the star borders add the slightest bit to the edges, plus pixel rounding, etc.

4.46 / 5 * 92 = 82.064

comment 2:

I'm totally blaming the jetlag.

The stars image is incorrect, then - 4.5/5 should take up half of the 5th star, but it takes up slightly less.

This isn't all that big of a deal, but we should fix it anyway. Especially if/when we move to retina images for stars, this might end up being more visible.

Attachments (1)

ratingstars.png (50.6 KB) - added by deconf 10 years ago.

Download all attachments as: .zip

Change History (10)

#1 @deconf
10 years ago

  • Priority changed from lowest to high

I think the correct formula would be:

4.46 rating:

(4.46*16)+(3*floor(4.46)) = 83.36

where:

16px is the width of a star and 3px is the width of the blank space between stars.

Using this formula the correct value will always be reflected in the star rating.

Currently a 4.46 rating looks rather like a 4.35 properly rendered rating.

Last edited 10 years ago by deconf (previous) (diff)

#2 @Otto42
10 years ago

  • Priority changed from high to lowest

We'll probably end up using a different set of images entirely, allowing for retina and other things, so the formula will need to be changed at that time accordingly.

#3 @dd32
10 years ago

These should be switched over to the dashicons at a minimum, which only offer 0/0.5/1 star increments.

#4 @Otto42
10 years ago

  • Priority changed from lowest to normal

Dashicons is definitely the way forward here and what I'll be implementing.

#6 @Otto42
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Dashicons are used for stars now. They are rounded to the nearest half-star.

@deconf
10 years ago

#7 @deconf
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Can you also implement dashicons for the search screen?

#8 @coffee2code
10 years ago

The Plugin Directory will be getting a new theme today or tomorrow that will include having dashicons for stars throughout the site.

#9 @coffee2code
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

This should be fixed now.

Note: See TracTickets for help on using tickets.