So much of software development consists of actually maintaining projects after they’ve been released. Unfortunately, that’s where a lot of time is actually spent refactoring that didn’t necessarily have to occur if more planning had been done from the outset of the project.
Sure – some teams get this right, some teams don’t, and sometimes it’s just the nature of bad luck. After all, the best we can do is try to make the smartest decisions possible given the initial requirements.
When it comes to building plugins, there’s a specific way that I organize my WordPress plugin files that I’ve found to make bug fixes, future updates, and overall development much easier as a the lifetime of a plugin increases.