Let me explain that:
When a new voting comes in, Mosets Tree uses this formula to determine the new rating:
Code: Select all
$new_rating = ((($link->link_rating * $link->link_votes) + $rating) / ++$link->link_votes);
The old value is taken, multiplied by the number of votes and added to the new rating. This is then devided by the new total number of votings.
Say in the case of the AEC, we currently have 79 votes and about 4 stars. When somebody votes another 5 stars, this happens:
Code: Select all
$new_rating = (((4*79) + 5) / 80); // = 4.0125
Now this is of course all sound and well, except for one problem - in the database table, the link_rating field is declared like so:
Code: Select all
`link_rating` decimal(3,2) NOT NULL default '0.00'
So instead of the 4.0125 points, the component receives 4.01
To make the matter even worse, if you do crawl your way up the ladder, there is a point where you simply cant get any further. Say the component had a rating of 4.3 before, then the math is:
Code: Select all
$new_rating = (((4.3*79) + 5) / 80); // = 4.30875
The final funny bit is, that the more votings you have, the larger this rounding error gets.
And this is why there is no extension with more than 50 votes and 4 stars.
I call for a bugfix and recount.