Programming: Code Complexity Metrics
From wikinotes
Metrics to help you identify parts of your codebase that might be difficult to modify.
Also known as Programming Complexity.
Documentation
wikipedia https://en.wikipedia.org/wiki/Programming_complexity
SLOC (source lines of code)
Literally, the number of lines of code in your application.
Cyclomatic Complexity
Maps the tree of all possible permutations of conditionals in your code.
https://en.wikipedia.org/wiki/Cyclomatic_complexity# where a connected-component is a separate system (ex. library call) edges - nodes + (2 * connected-components)1-10: simple 11-20: complex 20-50: highly complex 50+: impossibly complex
ABC (Assignments, Branches, Conditions)
https://en.wikipedia.org/wiki/ABC_Software_Metric
Essentially, add 1 point for every assignment, conditional, and function call.