Erik Doernenberg from ThoughtWorks has created the Toxicity Chart which is a neat “practical” visualization displayed as a bar chart in a spreadsheet that shows what classes in your system are toxic as defined by classes being larger than a threshold for certain software metrics. The metrics include file length, class complexity, class coupling, inner class length, method length, number of parameters per method, cyclomatic complex methods, nested “if” and “try” depths, complexity of boolean expressions, and missing switch defaults. Erik describes the visualization and some existing tools to create this visualization in his blog post How toxic is your code?
The image below shows the Toxicity Chart for Hibernate, from Erik’s post.
