One framing of criteria for good code now is "easy to modify in the future".
Documentation, tests, etc are in service of that goal.
But so is not over-engineering something.
Don't build a new code abstraction until you've done it a crappy way at least twice (but ideally three times).