One thing that this cannot take into account is the following....
There are a lot of things this can't take into account. That is why it states what it is basing the rank off. Number of monks that joined after you that have more XP. The process to determine monks that joined after you is potentially flawed. It does not use a date field but rather the node ID of the user - higher node means came after. If the current way of assigning node IDs changes - this code goes out the window.
It was only for fun afterall - L~R