Want to Make More Money? Refactor All the Things

I recently went refactoring on one of the core pieces of our workflow at OTM. We’ve had a mu-plugin that handles everything from cleaning up the admin section to creating CPTs to setting up the initial settings on a site and installing plugins. It is (was) a handy piece of software that automated a lot of tedious tasks.

But it wasn’t good enough.

My coworkers didn’t like having to manually update references to delete files or slog through 200 lines of code to replace a CPT slug and create a new one on the fly. I didn’t like having to manually delete the install files that got forgotten when we took a site live. No one liked creating test data manually in WP. So, a week ago I took the weekend to start ground-up and see what I could come up with.

~15 hours of work later and I estimate that the revised version will save us 1 hour on every build we complete. Minimum. That means at least 80 hours of saved work a year and a codebase that’s cleaner and significantly easier to maintain and will be easier to explain to a new developer during on-boarding. The relatively small amount of time it took to ground-up rebuild one of our tools will return almost 5X just over the next year alone.

So, if you want to make more money and be more efficient, take a piece of your workflow and refactor it. Dissect it, find the weaknesses, burn it down and rebuild it. Ruthlessly eliminate the chaff and clean, streamline, reduce, DRY.

P.S.: I also open-sourced the tool on Github so feel free to fork it, take it, PR it. https://github.com/oldtownmedia/evans