well, hopefully the author did learn something or at least enjoyed the process :)
(the code looks like a very junior or a non-dev wrote it tbh).