
You know code reviews are best practice, but they take time that your leadership may have decided is better spent on pushing forward with projects and getting applications to market faster. Have you ever, however, sat down with a calculator and figured out exactly what it’s costing your business not to perform code reviews?
To make the math a little easier, software testing, monitoring, and developer tool provider SmartBear has launched a code review ROI calculator. The tool, based on data from SmartBear’s customers as well as industry benchmarks, allows you to see what code reviews could save your business – and what it costs if you forego them.
Code Reviews, By the Numbers
To give you an idea of how much money you can save with code reviews, SmartBear’s ROI calculator has you enter:
- People per review
- Total number of developers
- Defects found per review
- Hours spent per review
- Labor cost per hour
- Total number of reviews per month
So, try the math on this scenario:
- 3 people involved in each code review
- A team of a total of 25 developers
- 5 defects found per review
- 2 hours spent on each review
- $50 per hour labor costs
- 20 reviews each month
Inputting those numbers into SmartBear’s ROI calculator, you see you can save $9,167 per month or $110,004 per year by finding and catching mistakes early.
The tool also allows you to see how using a code review tool can improve those numbers. Using the same example as above and a tool that allows you to find and fix 10 percent more code errors, you improve monthly savings to $16,367 and annual savings to $196,404.
Larger or Smaller Teams
Of course, the bigger your team and the more often they’re writing (and fixing) code, the greater the potential for savings, but what if you’re a start-up with a small team?
Entering these numbers:
- 2 people per review
- 5 developers
- 5 defects found during code review
- 2 hours spent per review
- $50 per hour labor costs
- 10 total reviews per month
You will also see significant savings, in this case, $1,329 per month or $15,948 per year.
Where Do Savings Come From?
Code reviews allow you to fix bugs, ensure compliance and confirm the application is meeting specs before the project is completed — when making those changes would be more expensive.
Still, it’s hard to see past the time it takes to perform them. Those two or three people in a review at $50 per hour (in all, probably more), for two hours at a time, 10 or 20 times per month, is a number that’s hard to get past. And, it means that development will take longer.
To see where code reviews’ time- and cost-savings come from, you need to look at the process from a different perspective. Catching errors and bugs and fixing them quickly means they won’t be causing problems in the next phase of development. If you don’t catch them immediately, the time and costs involved in rework can multiply. The Systems Sciences Institute at IBM reports that fixing bugs at implementation can cost five times more than during design and architecture. Moreover, fixes at the integration testing phase can cost 10 times more, during customer beta testing, 15 times more, and after product release, 30 times more.
Also, factor in your team’s loss of focus and momentum when they have to fix a defect, possibly running down rabbit holes in search of problems, and then the extra time it takes them to understand where they left off with what they were working on before they had to address the bug. It’s not just a disruptive, productivity-killing way to work. It’s expensive. A Bryan College study found that switching from task to task totals $450 million per year in global productivity.
A smarter — and more fiscally responsible — way to work is conducting code reviews as code is written, dealing with issues in the moment, and then moving on. Do the math.