I love Anki but haven't seen the code, but I don't think a rewrite is the answer, and in fact could result in a new code base with the same problem over long enough time. If you're noticing this problem, it would be great if you were able to get in touch with the author (maybe start an issue thread on GitHub) to at least start a dialogue to improve the state of the documentation and code conventions.