Thats how stats works, based on kills/deaths which is what I figured you were using since you used get_statsnum() which is based off of the same ranking system.
get_user_stats()
Gets overall stats which are stored in file on server and updated on every respawn or user disconnect. Function returns the position in stats by differece in kills to deaths.
Position = rank.
If you want to make your own ranking system with your own calculations you will need to do the math and then sort the list of players.