File Complexity Overall
  • There are 33 files with units, with 4,368 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)
    • 0 medium complex files (McCabe index sum 51-125; 0 lines of code)
    • 0 slightly complex files (McCabe index sum 26-50; 0 lines of code)
    • 33 simple files (McCabe index sum 1-25; 4,368 lines of code)
  • 296 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 0% | 100%
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
kt0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
android0% | 0% | 0% | 0% | 100%
Sources0% | 0% | 0% | 0% | 100%
SourceSample0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 33)

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
SourceIconButton.kt
in android/source/src/main/kotlin/com/gu/source/components/buttons
317 4 7 2 2
SourceChip.kt
in android/source/src/main/kotlin/com/gu/source/components/chips
479 3 6 1 3
MainActivity.kt
in android/sample/src/main/kotlin/com/gu/source
127 1 4 3 4
IconButton.swift
in Sources/Source/Components/Buttons
92 2 4 4 3
SourceRating.kt
in android/source/src/main/kotlin/com/gu/source/components/rating
235 1 3 1 3
SourceButton.kt
in android/source/src/main/kotlin/com/gu/source/components/buttons
395 2 3 1 2
SourceAlertBanner.kt
in android/source/src/main/kotlin/com/gu/source/components/banner
220 2 3 1 2
PagerProgressBar.kt
in android/source/src/main/kotlin/com/gu/source/components/pager
252 2 3 1 2
AndroidLibraryConventionPlugin.kt
in android/build-logic/convention/src/main/kotlin/com/theguardian/convention
47 1 3 6 3
Navigator.kt
in android/sample/src/main/kotlin/com/gu/source/navigation
23 3 3 13 1
Color+Hex.swift
in Sources/Source/ColorPalette/Extensions
90 1 3 3 3
PlainSourceButton.kt
in android/source/src/main/kotlin/com/gu/source/components/buttons
224 2 2 1 1
SourceBaseChip.kt
in android/source/src/main/kotlin/com/gu/source/components/chips
140 1 2 1 2
HorizontalExpandingText.kt
in android/source/src/main/kotlin/com/gu/source/components
57 2 2 4 1
Theme.kt
in android/source/src/main/kotlin/com/gu/source/components/theme
26 2 2 8 1
ScrollingPaginationIndicator.swift
in Sources/Source/Components
101 1 2 2 2
UIColor+Hex.swift
in SourceSample/SourceSample
31 1 2 6 2
AppColourMode.kt
in android/source/src/main/kotlin/com/gu/source/daynight
16 1 1 6 1
SourceTextButton.kt
in android/source/src/main/kotlin/com/gu/source/components/buttons
170 1 1 1 1
PromoSticker.kt
in android/source/src/main/kotlin/com/gu/source/components/promosticker
173 1 1 1 1
PagerProgressIndicator.kt
in android/source/src/main/kotlin/com/gu/source/components/pager
141 1 1 1 1
PagerProgressButtons.kt
in android/source/src/main/kotlin/com/gu/source/components/pager
123 1 1 1 1
AndroidApplicationConventionPlugin.kt
in android/build-logic/convention/src/main/kotlin/com/theguardian/convention
40 1 1 3 1
ComposeLibraryConventionPlugin.kt
in android/build-logic/convention/src/main/kotlin/com/theguardian/convention
44 1 1 2 1
AndroidTestConventionPlugin.kt
in android/build-logic/convention/src/main/kotlin/com/theguardian/convention
30 1 1 3 1
ComposeApplicationConventionPlugin.kt
in android/build-logic/convention/src/main/kotlin/com/theguardian/convention
14 1 1 7 1
KotlinLibraryConventionPlugin.kt
in android/build-logic/convention/src/main/kotlin/com/theguardian/convention
19 1 1 5 1
SourceIcon.swift
in Sources/Source/Resources
409 1 1 0 1
UIColor+Dynamic.swift
in Sources/Source/ColorPalette/Extensions
65 1 1 2 1
IconPickerView.swift
in SourceSample/SourceSample/Buttons
123 1 1 1 1
ButtonThemeBuilderView.swift
in SourceSample/SourceSample/Buttons
88 1 1 1 1
CopyableLabel.swift
in SourceSample/SourceSample
44 1 1 2 1
SourceSampleApp.swift
in SourceSample/SourceSample
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...