instagram / LibCST
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 3,624 units with 21,101 lines of code in units (51.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (339 lines of code)
    • 24 medium complex units (913 lines of code)
    • 102 simple units (2,329 lines of code)
    • 3,495 very simple units (17,520 lines of code)
0% | 1% | 4% | 11% | 83%
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
rs0% | 3% | 3% | 5% | 87%
py0% | <1% | 4% | 14% | 80%
pyi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
native/libcst0% | 3% | 2% | 5% | 87%
libcst/_nodes0% | 1% | 5% | 16% | 76%
libcst/_parser0% | 0% | 11% | 19% | 69%
libcst/codemod0% | 0% | 8% | 15% | 76%
native/libcst_derive0% | 0% | 32% | 0% | 67%
libcst/metadata0% | 0% | 6% | 9% | 84%
libcst0% | 0% | <1% | 8% | 90%
libcst/codegen0% | 0% | 7% | 30% | 62%
libcst/matchers0% | 0% | 0% | 11% | 88%
libcst/testing0% | 0% | 0% | 75% | 24%
libcst/helpers0% | 0% | 0% | 17% | 82%
stubs/libcst_native0% | 0% | 0% | 0% | 100%
stubs0% | 0% | 0% | 0% | 100%
stubs/libcst0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
134 31 2
156 30 1
49 27 2
25 20 1
77 16 3
34 16 2
30 16 3
84 15 1
45 14 2
74 14 2
24 14 1
27 14 1
44 14 1
36 13 1
32 13 2
33 13 5
19 12 1
54 12 2
26 12 2
27 12 3
36 11 2
19 11 1
34 11 1
56 11 2
24 11 2
24 11 1
29 11 2
35 10 2
36 10 2
55 10 1
51 10 4
18 10 1
17 10 1
25 10 1
30 10 1
30 10 2
32 10 1
44 10 2
23 10 4
13 9 1
27 9 1
18 9 2
19 9 2
10 9 1
39 9 2
38 9 2
19 9 1
22 8 2
11 8 2
19 8 3