I'll log a ticket to look at points. I suspect that some of the recalculations might be date stamped with the migration date. I think much of this will shake out in a month or so, but for now it's definitely a bit jarring.
Remember that you also get points from liked posts. It seems that someone/something is liking random posts according to what I saw on my profile some days ago. With the huge amount of posts, Gail can increase points without any effort now.
Luis C. General Disclaimer:
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?