so basically you say the flaws it gets right now are:
1. Let's say my username is A, and then I register another username B and say that I am referred by A, and it goes through(A gets one referral).
2. And then if I delete B, A's referral count is still 1.
Yes, exactly... and also in its current state, it will allow the registering member to select themselves, sometime soon, I am going to modify my copy to correct these flaws and add a couple neat little tweaks as well