File Complexity Overall
  • There are 252 files with units, with 20,182 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; 396 lines of code)
    • 11 slightly complex files (McCabe index sum 26-50; 2,526 lines of code)
    • 240 simple files (McCabe index sum 1-25; 17,260 lines of code)
  • 173 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 1% | 12% | 85%
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
scala0% | 0% | 3% | 14% | 81%
tsx0% | 0% | 0% | 12% | 87%
ts0% | 0% | 0% | 7% | 92%
js0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
app0% | 0% | 9% | 16% | 74%
public0% | 0% | 0% | 10% | 89%
common0% | 0% | 0% | 18% | 81%
uploader0% | 0% | 0% | 0% | 100%
pluto-message-ingestion0% | 0% | 0% | 0% | 100%
expirer0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
scheduler0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
project0% | 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
PublishAtomCommand.scala
in app/model/commands
396 13 59 15 14
video.ts
in public/video-ui/src/util
142 21 45 32 6
248 8 40 16 18
YouTubeVideos.scala
in common/src/main/scala/com/gu/media/youtube
217 9 35 16 7
YouTubePartnerApi.scala
in common/src/main/scala/com/gu/media/youtube
365 10 34 9 6
TagPicker.tsx
in public/video-ui/src/components/FormFields
471 12 34 7 9
VideoAsset.tsx
in public/video-ui/src/components/VideoUpload
262 8 32 12 8
UploadController.scala
in app/controllers
293 12 31 11 5
ThriftUtil.scala
in common/src/main/scala/com/gu/media/util
129 8 30 23 9
YouTubeProcessingStatus.scala
in common/src/main/scala/com/gu/media/youtube
108 6 30 28 9
IconikController.scala
in app/controllers
154 8 28 18 6
command-helpers.ts
in public/video-ui/src/components/FormFields/richtext/utils
137 5 27 20 9
UpdateAtomCommand.scala
in app/model/commands
208 7 24 12 7
VideoPublishBar.tsx
in public/video-ui/src/components/VideoPublishBar
129 8 24 19 8
AddAssetCommand.scala
in app/model/commands
176 5 23 13 12
WorkflowApi.ts
in public/video-ui/src/services
298 14 23 8 5
JobCompletedMetrics.scala
in common/src/main/scala/com/gu/media/util
148 7 22 15 14
ManagedField.tsx
in public/video-ui/src/components/ManagedForm
168 6 22 13 10
AddAssetToAtom.scala
in uploader/src/main/scala/com/gu/media/upload
225 11 21 9 4
ClientAsset.scala
in common/src/main/scala/com/gu/media/model
152 7 21 14 5
DatePicker.tsx
in public/video-ui/src/components/FormFields
213 7 21 10 7
Api.scala
in app/controllers
237 13 20 8 4
index.tsx
in public/video-ui/src/pages/Video
229 7 20 9 9
VideosApi.ts
in public/video-ui/src/services
455 14 19 4 3
MediaAtomHelpers.scala
in common/src/main/scala/com/gu/media/util
100 8 18 18 4
Header.tsx
in public/video-ui/src/components
336 11 18 5 4
CommandException.scala
in app/model/commands
125 5 17 14 7
PlutoController.scala
in app/controllers
125 7 17 14 5
TranscoderComplete.scala
in uploader/src/main/scala/com/gu/media/upload
148 5 16 11 6
DataStores.scala
in app/data
141 4 16 11 4
error.ts
in public/video-ui/src/slices
142 5 16 11 9
VideoItem.tsx
in public/video-ui/src/components/VideoItem
140 3 16 11 10
parseGridMetadata.ts
in public/video-ui/src/util
148 8 15 10 3
90 8 14 16 4
YouTubeUploader.scala
in common/src/main/scala/com/gu/media/youtube
154 4 14 9 6
142 5 13 9 5
105 6 13 12 3
package.scala
in common/src/main/scala/com/gu/media/youtube
191 10 13 7 3
IconikDynamoStore.scala
in common/src/main/scala/com/gu/media/iconik
71 5 13 18 4
CapiAccess.scala
in common/src/main/scala/com/gu/media
109 5 12 11 5
getComposerData.ts
in public/video-ui/src/util
51 2 12 24 10
imageHelpers.ts
in public/video-ui/src/util
49 5 12 24 4
85 6 11 13 4
MediaAtomImplicits.scala
in common/src/main/scala/com/gu/media/util
63 3 11 17 5
tagParsers.ts
in public/video-ui/src/util
91 2 11 12 9
config.ts
in public/video-ui/src/util
101 4 11 11 3
TagSearch.tsx
in public/video-ui/src/components/TagSearch
80 4 11 14 5
Workflow.tsx
in public/video-ui/src/components/Workflow
87 5 11 13 4
process-record.ts
in pluto-message-ingestion/src
83 2 11 13 9
FfMpeg.scala
in uploader/src/main/scala/com/gu/media/upload
79 3 10 13 6
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...