A code audit is a rare do-over in business, a chance to look through your existing codebase and make it better based on what you know now. Just like rehabbing an old house, code audits allow you to save everything that’s working and build on that, instead of scrapping the lot and starting from scratch.
This means they can be the best way to squeeze value out of what you already have.
Code audits are one of the three ways we get to know new partners here at TXI. Inceptions let us collaborate with businesses to brainstorm and scope out new solutions. Product Design Workshops let us test new product ideas on real users. And code audits let us examine existing software and hosting environments for source code vulnerabilities, security weaknesses, current best practices and overall integrity. All three strategies let us learn about our partners’ businesses so that we can build for what’s next.
Want to get started? Check out our services.
Jump ahead to:
- Deciding if you need a code audit
- Backend code audits
- Frontend code audits
- Infrastructure audits
- Code audit tools
- What you get out of a code audit
- What happens after a code audit
What is a code audit?
A software code audit is a specialized code review where we analyze your software’s architecture to determine how well it will work for your business. We’re looking for things like out-of-date tools, security risks, unnecessary complexity that could hide bugs, and missing best practices that might hint at deeper problems. There are three basic types: backend code audits, where we test the code that makes your software run; frontend code audits, where we test the code that powers your user interface; and infrastructure audits, where we test the systems on which your code runs.
The things we’re looking at will change, but with all three what we're really trying to figure out is whether your current software can handle the future of your business. The results are twofold: a list of updates that will get the product in line with current best practices and an estimate of what it will take to make them.
Why do we do code audits?
Generally when we’re starting an engagement with a code audit, our new partner has an existing codebase that’s working. What they want to know is how much longer it’s going to work, either because the code they have is shaky or because they want to grow. Sometimes things are mostly fine, and we just need to make a few tweaks for stability and scale. Other times there are major updates that need to be made. In either case, the company is facing a barrier to change, and they need to find out what needs to happen to move forward.
Unlike with an Inception or Product Design Workshop, we’re not looking to change the business model or functionality following a code audit. We’re either taking over support and maintenance for an existing product or we’re preparing to build something greater on the foundation the business already has, and we need to better understand what that is.
With a client like Vibes, a mobile marketing company, we were simply assessing what it would take to upgrade to a new version of Ruby on Rails so the company can scale internationally. For Cobbler Concierge, a startup offering on-demand shoe and handbag repair, we were coming on board to run development for the website and operations management system. We started with a holistic performance assessment of their software and infrastructure so that we could build a strong foundation for Cobbler's future business needs.
How to know if you need a code audit
A good rule of thumb is that if you’ve had software sitting on a stale server for two years or more, you should really have someone look at it. At that point, it’s likely using code that’s out-of-date and therefore no longer receiving security updates for new bugs. For example, Ruby and Rails, two of the tools we use most often, have very specific rules around which versions get security patches. Gems — the pieces of reusable code Ruby developers use to build most standard functionality — also need to be updated, sometimes with a newer version, sometimes with a different, better Gem. If no one’s been checking for security issues and making updates, you’re risking vulnerability.
Beyond security and stability, there are a slew of user experience reasons you may need a source code audit. Best practices on the web change rapidly, and a frontend software audit will let you catch speed issues and outdated user interactions. For example, responsive design, a flexible layout approach that ensures websites scale from desktop computers to mobile devices, didn’t exist even just a few years ago. Now it’s effectively mandatory.
Having a regular code audit process is especially necessary for mobile applications, where “fastest and best” is the minimum bar you have to clear to get user adoption. Because the operating system changes are so major and so frequent — and because you just look bad if you don’t have the latest user interface features — you should consider doing an Objective C, Swift or Java code audit on your iOS or Android applications if the code has been untouched for more than a year. Swift, Apple’s new language for iOS apps, especially needs looking at, because its core language is still changing rapidly.
What the code audit process looks like for our clients
At TXI, we build value by understanding the whole business. Collaboration is always a part of our engagements, but code audits are one of the few things we do on our own, and therefore one of the least time intensive for our clients. We just need access and context. Access to a full repository — where we can see the history of the code — is the best option, though we can also work off of a snapshot. Then we’ll start combing through the code and asking questions.
Ideally, there will be someone on our partner’s team who can offer context for the code. An owner can help us understand the business cases for why code was written the way it was. If there’s someone with technical domain knowledge, like a CTO, who can also answer questions about the deeper technological reasons for building certain features certain ways, that’s even better. A code audit can push your product forward with almost no extra strain on your team.