April 2019
Intermediate to advanced
646 pages
16h 48m
English
Cyclomatic complexity is a metric that was developed by Thomas J. McCabe in 1976; because of its author, it's also known as McCabe's complexity. Cyclomatic complexity measures the number of linear paths through a piece of code. In short, all branching points (if statements) and loops (for and while statements) increase code complexity.
Depending on the value of measured cyclomatic complexity, code can be classified into various complexity classes. The following is a table of commonly used McCabe complexity classes:
|
Cyclomatic complexity |
What it means |
|
1 to 10 |
Not complex |
|
11 to 20 |
Moderately complex |
|
21 to 50 |
Really complex |
|
More than 50 |
Too complex |
Cyclomatic complexity is more of a ...