I will start with a cliché
A software code should depict following qualities:
You may find yourself in a difficult situation when you ask a question about whether any particular code depicts above quality features or not.
A technique that helps is by looking at the development timeline of any software. If the software code remains easier to maintain, extend and modular over its lifetime then it means that the code has above quality features.
I have written difficult to read, hard to extend and rotten software code. I only knew this after six months into the development when a change happens. Hence development timeline is important in understanding quality factors.