File Complexity Overall
  • There are 48 files with units, with 5,745 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 1 medium complex files (McCabe index sum 51-125; 454 lines of code)
    • 5 slightly complex files (McCabe index sum 26-50; 1,499 lines of code)
    • 42 simple files (McCabe index sum 1-25; 3,792 lines of code)
  • 4 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 7% | 26% | 66%
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
go0% | 0% | 17% | 48% | 34%
js0% | 0% | 0% | 15% | 84%
py0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
go0% | 0% | 17% | 48% | 34%
javascript0% | 0% | 0% | 15% | 84%
python0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 48)

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
454 12 60 13 8
396 7 47 12 10
287 7 42 15 9
313 9 41 13 7
259 10 37 14 8
text_generation.js
in javascript
244 18 28 11 3
304 7 25 8 4
146 12 22 15 4
chat.go
in go
121 3 20 17 8
files.js
in javascript
129 12 18 14 4
126 6 16 13 11
144 8 16 11 4
count_tokens.js
in javascript
219 13 15 7 3
files.py
in python
103 9 13 13 3
147 11 13 9 2
chat.js
in javascript
100 8 13 13 2
57 2 12 21 9
110 9 12 11 2
TextGeneration.java
in java/src/main/java/com/example/gemini
190 6 12 6 2
166 11 11 7 1
cache.js
in javascript
227 8 11 5 4
91 2 10 11 5
cache.py
in python
159 7 9 6 2
65 2 8 12 4
models.py
in python
22 2 8 36 7
133 7 8 6 2
chat.py
in python
75 3 7 9 3
65 2 6 9 3
54 3 5 9 3
grounding.py
in python
34 1 5 15 5
53 2 4 8 2
CodeExecution.java
in java/src/main/java/com/example/gemini
53 2 4 8 2
FunctionCalling.java
in java/src/main/java/com/example/gemini
108 1 4 4 4
code_execution.js
in javascript
55 3 4 7 2
grounding.js
in javascript
35 1 4 11 4
function_calling.js
in javascript
144 4 4 3 1
36 1 3 8 3
29 1 3 10 3
SafetySettings.java
in java/src/main/java/com/example/gemini
63 2 3 5 2
safety_settings.js
in javascript
49 2 3 6 2
embed.py
in python
30 2 2 7 1
embed.js
in javascript
27 2 2 7 1
19 1 1 5 1
24 1 1 4 1
16 1 1 6 1
ChatSession.java
in java/src/main/java/com/example/gemini
35 1 1 3 1
16 1 1 6 1
13 1 1 8 1
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...