File Complexity Overall
  • There are 53 files with units, with 13,632 lines of code.
    • 1 very complex files (McCabe index sum 251+; 1,432 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 3 medium complex files (McCabe index sum 51-125; 1,263 lines of code)
    • 15 slightly complex files (McCabe index sum 26-50; 8,760 lines of code)
    • 34 simple files (McCabe index sum 1-25; 2,177 lines of code)
  • 2 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system10% | 0% | 9% | 64% | 15%
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
go10% | 0% | 9% | 64% | 15%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
hal14% | 0% | 4% | 74% | 6%
brokers0% | 0% | 60% | 39% | 0%
plugins0% | 0% | 10% | 42% | 47%
example0% | 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
cmd.go
in hal
1432 163 373 26 53
broker.go
in brokers/slack
551 24 91 17 25
prefs.go
in hal
406 32 81 20 16
oncall_plugin.go
in plugins/pagerduty
306 16 67 22 24
plugin.go
in plugins/pluginmgr
294 13 50 17 17
255 16 49 19 9
plugin.go
in plugins/google_calendar
264 13 46 17 17
plugin.go
in plugins/prefmgr
201 10 44 22 9
broker.go
in brokers/console
181 18 42 23 14
204 16 40 20 5
router.go
in hal
147 10 38 26 20
broker.go
in brokers/hipchat
179 17 36 20 9
190 15 36 19 8
plugin.go
in plugins/blabber
196 9 35 18 8
poller.go
in plugins/pagerduty
138 8 31 22 10
event.go
in hal
165 15 30 18 7
page_plugin.go
in plugins/pagerduty
129 6 28 22 11
6042 7 27 0 8
logger.go
in hal
175 18 26 15 3
plugin.go
in plugins/archive
174 7 24 14 8
pd_events_v1.go
in plugins/pagerduty
133 10 22 17 7
134 12 20 15 5
google.go
in plugins/google_calendar
111 4 19 17 16
plugin.go
in plugins/mark
114 5 17 15 5
72 1 15 21 15
91 2 15 16 10
63 1 15 24 15
84 7 13 15 5
plugin.go
in plugins/roster
106 5 13 12 4
kv.go
in hal
74 5 12 16 3
helpers.go
in plugins/pagerduty
60 4 12 20 7
http.go
in plugins/prefmgr
36 5 11 31 5
main.go
in example/everything
103 3 11 11 7
sqldb.go
in hal
58 3 10 17 5
plugin.go
in plugins/docker
52 4 10 19 5
pd_events_v2.go
in plugins/pagerduty
97 3 10 10 8
pd_user.go
in plugins/pagerduty
59 2 10 17 5
54 4 9 17 3
pd_service.go
in plugins/pagerduty
50 2 8 16 5
pd_schedule.go
in plugins/pagerduty
53 2 8 15 5
plugin.go
in plugins/inspect
42 3 7 17 4
plugin.go
in plugins/seppuku
39 3 6 15 4
pd_oncall.go
in plugins/pagerduty
34 1 5 15 5
pd_policy.go
in plugins/pagerduty
32 1 5 16 5
pd_team.go
in plugins/pagerduty
32 1 5 16 5
plugin.go
in plugins/cross_the_streams
42 2 5 12 4
plugin.go
in plugins/guys
28 2 5 18 4
plugin.go
in plugins/pagerduty
43 2 4 9 3
main.go
in example/docker-repl
38 1 4 11 4
plugin.go
in plugins/spam
20 2 3 15 2
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...