File Complexity Overall
  • There are 77 files with units, with 19,197 lines of code.
    • 3 very complex files (McCabe index sum 251+; 5,963 lines of code)
    • 2 complex files (McCabe index sum 126-250; 1,723 lines of code)
    • 11 medium complex files (McCabe index sum 51-125; 4,651 lines of code)
    • 14 slightly complex files (McCabe index sum 26-50; 3,586 lines of code)
    • 47 simple files (McCabe index sum 1-25; 3,274 lines of code)
  • 47 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system31% | 8% | 24% | 18% | 17%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
py31% | 8% | 24% | 18% | 17%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
redis32% | 9% | 24% | 19% | 13%
benchmarks0% | 0% | 24% | 0% | 75%
doctests0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
core.py
in redis/commands
3073 347 391 13 5
cluster.py
in redis
1678 118 344 21 24
1212 109 316 26 37
client.py
in redis
1047 92 250 24 22
helpers.py
in redis/_parsers
676 51 215 32 21
connection.py
in redis/asyncio
969 47 109 11 18
commands.py
in redis/commands/search
580 44 74 13 9
cache.py
in redis
314 52 68 22 6
sentinel.py
in redis
269 26 66 25 7
cluster.py
in redis/asyncio
1101 45 63 6 4
ocsp.py
in redis
215 13 58 27 14
basic_operations.py
in benchmarks
148 12 58 39 6
querystring.py
in redis/commands/search
145 36 57 39 7
query.py
in redis/commands/search
217 30 54 25 21
commands.py
in redis/commands/timeseries
483 37 52 11 3
commands.py
in redis/commands/bf
210 49 52 25 3
aggregation.py
in redis/commands/search
170 24 49 29 9
cluster.py
in redis/commands
423 44 49 12 4
event.py
in redis
255 38 48 19 4
client.py
in redis/asyncio
1035 36 46 4 3
utils.py
in redis
202 19 44 22 8
resp3.py
in redis/_parsers
206 10 41 20 27
hiredis.py
in redis/_parsers
173 10 40 23 13
__init__.py
in redis/commands/bf
154 16 36 23 3
helpers.py
in redis/commands
76 8 34 45 7
lock.py
in redis
173 14 32 18 4
token.py
in redis/auth
95 24 31 33 3
commands.py
in redis/commands/json
219 28 30 14 2
commands.py
in redis/_parsers
170 7 30 18 9
token_manager.py
in redis/auth
235 24 29 12 3
sentinel.py
in redis/asyncio
247 12 23 9 6
socket.py
in redis/_parsers
110 10 21 19 5
utils.py
in redis/commands/vectorset
52 3 20 38 9
resp2.py
in redis/_parsers
92 2 20 22 16
88 6 20 23 7
base.py
in redis/_parsers
186 13 19 10 3
index_definition.py
in redis/commands/search
58 7 18 31 4
backoff.py
in redis
57 17 17 30 1
reducers.py
in redis/commands/search
68 12 17 25 6
info.py
in redis/commands/bf
97 13 16 16 2
field.py
in redis/commands/search
123 9 15 12 5
decoders.py
in redis/commands/json
35 4 14 40 5
tasks.py
in root
67 9 13 19 3
sentinel.py
in redis/commands
31 13 13 42 1
encoders.py
in redis/_parsers
36 3 12 33 6
base.py
in benchmarks
34 5 12 35 5
utils.py
in redis/commands/timeseries
30 5 11 37 3
suggestion.py
in redis/commands/search
35 4 11 31 5
commands.py
in redis/commands/vectorset
183 11 11 6 1
lock.py
in redis/asyncio
163 5 11 7 4
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...