Code Smell Catalog
All 22 code smells in Martin Fowler's taxonomy, organised into five categories and annotated with severity, detection hints, refactoring strategy, and an estimated annual cost per instance. Select your team's smells in the calculator below, or open any smell for the full deep-dive.
Smell Profile Calculator
Select the code smells present in your codebase, set instance counts, and see the estimated annual cost.
Select smells present in your codebase:
Bloaters
5 smellsCode structures that have grown so large they become hard to work with. Bloaters accumulate gradually as the codebase ages and new features pile onto existing structures without adequate refactoring.
Long Method
Bloaters
Methods that have grown too long to understand at a glance, typically exceeding 20-30 lines.
God Class
Bloaters
A class that knows too much and does too much, concentrating responsibilities that should be distributed.
Primitive Obsession
Bloaters
Using primitive types (strings, ints, booleans) instead of small value objects for domain concepts.
Long Parameter List
Bloaters
Functions that take so many parameters that callers cannot remember the correct order or meaning.
Data Clumps
Bloaters
Groups of data items that repeatedly appear together across multiple classes or method signatures.
Object-Orientation Abusers
4 smellsIncorrect or incomplete application of object-oriented principles. These smells arise when teams partially adopt OO patterns or misunderstand inheritance and polymorphism, creating structures that fight against the language rather than working with it.
Switch Statements
Object-Orientation Abusers
Complex switch/case or if/else chains that duplicate type-checking logic across multiple locations.
Refused Bequest
Object-Orientation Abusers
A subclass that inherits methods and data it does not need or want, violating the Liskov Substitution Principle.
Alternative Classes with Different Interfaces
Object-Orientation Abusers
Two or more classes that perform similar functions but have incompatible method names and signatures.
Temporary Field
Object-Orientation Abusers
Instance fields that are only set and used in specific circumstances, remaining empty or null the rest of the time.
Change Preventers
3 smellsStructures that make any single change require modifications in many other places. These smells directly multiply the cost of every feature request and bug fix, because one change cascades into five or ten.
Divergent Change
Change Preventers
A single class that must be modified for many different, unrelated reasons.
Shotgun Surgery
Change Preventers
A single logical change requires small edits scattered across many different classes or files.
Parallel Inheritance Hierarchies
Change Preventers
Two class hierarchies that mirror each other, so adding a subclass in one requires adding a corresponding subclass in the other.
Dispensables
6 smellsCode that serves no purpose or could be removed without affecting behaviour. Dispensables are the easiest smells to fix but their accumulation slowly buries the important code under layers of noise.
Duplicate Code
Dispensables
Identical or near-identical code blocks that appear in multiple locations, requiring synchronized maintenance.
Lazy Class
Dispensables
A class that does too little to justify its existence, adding complexity without proportionate value.
Data Class
Dispensables
A class that contains only fields and getters/setters with no meaningful behaviour of its own.
Dead Code
Dispensables
Code that is never executed: unreachable branches, unused variables, commented-out blocks, and orphaned functions.
Speculative Generality
Dispensables
Abstractions, parameters, and classes created for anticipated future needs that never materialised.
Comments (as Smell)
Dispensables
Excessive comments that compensate for unclear code instead of the code being rewritten to be self-explanatory.
Couplers
4 smellsExcessive coupling between classes or modules. Couplers make it impossible to change or test one part of the system without dragging in half the codebase, turning simple tasks into complex multi-file operations.
Feature Envy
Couplers
A method that uses data and methods from another class more than from its own class.
Inappropriate Intimacy
Couplers
Two classes that depend too heavily on each other's internal details, creating a tangled, inseparable pair.
Message Chains
Couplers
Long chains of method calls like a.getB().getC().getD() that couple the caller to the entire navigation path.
Middle Man
Couplers
A class that delegates most of its work to another class, adding an unnecessary layer of indirection.