facebookincubator / FBX2glTF
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 168 units with 3,381 lines of code in units (57.3% of code).
    • 1 very complex units (315 lines of code)
    • 7 complex units (1,054 lines of code)
    • 7 medium complex units (370 lines of code)
    • 22 simple units (678 lines of code)
    • 131 very simple units (964 lines of code)
9% | 31% | 10% | 20% | 28%
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
cpp10% | 36% | 9% | 22% | 20%
js0% | 0% | 100% | 0% | 0%
hpp0% | 0% | 7% | 7% | 85%
py0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src85% | 0% | 0% | 0% | 14%
src/fbx0% | 61% | 0% | 24% | 14%
src/raw0% | 20% | 24% | 24% | 30%
src/gltf0% | 34% | 0% | 15% | 50%
src/fbx/materials0% | 38% | 31% | 16% | 13%
npm/fbx2gltf0% | 0% | 100% | 0% | 0%
src/gltf/properties0% | 0% | 11% | 30% | 57%
src/utils0% | 0% | 0% | 23% | 76%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
315 60 2
182 49 3
139 43 4
326 36 4
105 33 1
121 28 0
57 28 4
124 26 4
101 21 0
55 17 3
45 17 1
44 14 6
29 13 1
41 12 0
55 11 0
51 10 0
55 10 5
36 10 0
31 10 1
19 9 4
46 9 2
24 9 1
29 8 2
32 8 4
19 8 1
34 7 4
30 7 6
20 7 1
56 6 3
21 6 3
51 6 4
26 6 1
20 6 0
23 6 0
10 6 2
31 6 3
14 6 1
15 5 4
14 5 1
18 5 0
17 5 1
18 5 2
12 4 1
11 4 1
16 4 2
33 4 3
15 4 3
17 4 2
13 4 2
24 4 2