facebookexperimental / fb-vscode
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 19,297 units with 229,699 lines of code in units (57.4% of code).
    • 11 very complex units (2,054 lines of code)
    • 105 complex units (10,148 lines of code)
    • 789 medium complex units (38,618 lines of code)
    • 1,900 simple units (47,813 lines of code)
    • 16,492 very simple units (131,066 lines of code)
<1% | 4% | 16% | 20% | 57%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts<1% | 4% | 16% | 20% | 57%
js3% | 4% | 17% | 23% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/vs<1% | 4% | 16% | 20% | 57%
extensions/emmet5% | 11% | 24% | 30% | 26%
build/lib0% | 5% | 15% | 36% | 42%
build/npm0% | 32% | 37% | 13% | 16%
extensions/git0% | 1% | 19% | 24% | 54%
extensions/extension-editing0% | 24% | 12% | 14% | 48%
extensions/grunt0% | 31% | 0% | 16% | 51%
extensions/php-language-features0% | 13% | 23% | 23% | 38%
src0% | 17% | 9% | 15% | 57%
extensions/typescript-language-features0% | <1% | 10% | 20% | 69%
extensions/html-language-features0% | 0% | 37% | 13% | 48%
build/monaco0% | 0% | 47% | 12% | 39%
extensions/json-language-features0% | 0% | 53% | 15% | 30%
build0% | 0% | 32% | 15% | 52%
extensions/npm0% | 0% | 14% | 28% | 57%
extensions/merge-conflict0% | 0% | 17% | 30% | 52%
extensions/markdown-language-features0% | 0% | 5% | 15% | 79%
extensions/configuration-editing0% | 0% | 23% | 17% | 59%
extensions/css-language-features0% | 0% | 14% | 24% | 61%
extensions/jake0% | 0% | 21% | 24% | 53%
extensions/gulp0% | 0% | 20% | 26% | 53%
extensions/debug-auto-launch0% | 0% | 55% | 31% | 12%
extensions/theme-seti0% | 0% | 11% | 22% | 65%
extensions/debug-server-ready0% | 0% | 22% | 29% | 48%
build/azure-pipelines0% | 0% | 0% | 35% | 64%
extensions/php0% | 0% | 0% | 68% | 31%
build/builtin0% | 0% | 0% | 32% | 67%
extensions/typescript-basics0% | 0% | 0% | 0% | 100%
extensions/git-ui0% | 0% | 0% | 0% | 100%
extensions/json0% | 0% | 0% | 0% | 100%
extensions/python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
132 71 2
221 71 4
134 66 6
134 65 2
251 57 2
118 56 2
217 54 4
244 54 3
365 52 0
180 51 1
58 51 1
150 48 1
158 47 0
201 46 1
119 45 8
90 45 1
108 45 2
138 44 2
146 42 7
115 42 2
122 42 0
99 41 3
118 41 1
117 41 3
51 40 2
115 39 4
154 39 7
126 38 2
133 38 1
130 37 0
106 36 1
159 36 0
113 36 0
133 36 0
140 36 3
94 35 1
103 34 1
95 34 0
111 34 3
134 34 6
92 34 1
68 33 1
65 33 1
89 33 1
151 33 2
100 33 8
69 32 2
517 32 8
83 32 3
36 32 2