Calculate rating

Line is too long. [109/80]<br>Redundant `self` detected.