File Complexity Overall
  • There are 708 files with units, with 98,014 lines of code.
    • 4 very complex files (McCabe index sum 251+; 9,155 lines of code)
    • 17 complex files (McCabe index sum 126-250; 18,556 lines of code)
    • 41 medium complex files (McCabe index sum 51-125; 13,888 lines of code)
    • 89 slightly complex files (McCabe index sum 26-50; 18,500 lines of code)
    • 557 simple files (McCabe index sum 1-25; 37,915 lines of code)
  • 476 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system9% | 18% | 14% | 18% | 38%
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
c72% | 12% | 0% | 0% | 14%
js25% | 33% | 24% | 15% | 1%
cpp32% | 16% | 11% | 16% | 23%
cc0% | 18% | 12% | 24% | 44%
py0% | 18% | 50% | 18% | 12%
h0% | 6% | 0% | 4% | 89%
php0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
plugin5% | 17% | 12% | 19% | 44%
web27% | 28% | 25% | 16% | 1%
crypto46% | 0% | 16% | 11% | 26%
base0% | 37% | 0% | 11% | 50%
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
jasmine.js
in web/jasmine
1679 235 517 31 27
pnacl_shim.c
in plugin/ppapi/ppapi/native_client/src/untrusted/pnacl_irt_shim
4114 477 480 12 4
1807 45 376 21 49
testharness.js
in web/resources
1555 107 351 23 62
keywrapunwrap.js
in web/jsTests
1370 119 242 18 23
idl_parser.py
in plugin/ppapi/ppapi/generators
594 88 234 39 20
multithreaded.js
in web/jsTests
713 140 211 30 5
plugin.cc
in plugin/ppapi/ppapi/native_client/src/trusted/plugin
1507 77 206 14 12
nacltest.js
in plugin/ppapi/ppapi/native_client/tools/browser_tester/browserdata
708 85 187 26 9
ppb_rpc_client.cc
in plugin/ppapi/ppapi/native_client/src/shared/ppapi_proxy
3381 186 186 6 1
ppb_rpc_server.cc
in plugin/ppapi/ppapi/native_client/src/shared/ppapi_proxy
2847 186 186 7 1
942 35 182 19 21
ppb_instance_proxy.cc
in plugin/ppapi/ppapi/proxy
1048 82 181 17 6
gles2.c
in plugin/ppapi/ppapi/lib/gl/gles2
727 156 171 24 2
ppb_opengles2_shared.cc
in plugin/ppapi/ppapi/shared_impl
866 156 156 18 1
plugin_opengles.cc
in plugin/ppapi/ppapi/native_client/src/shared/ppapi_proxy
898 156 156 17 1
Variant.h
in base
650 62 154 24 46
jasmine-html.js
in web/jasmine
543 52 145 27 10
793 72 136 17 5
idl_c_proto.py
in plugin/ppapi/ppapi/generators
515 34 132 26 11
ppapi_param_traits.cc
in plugin/ppapi/ppapi/proxy
454 50 127 28 19
idl_diff.py
in plugin/ppapi/ppapi/generators
242 16 125 52 16
idl_node.py
in plugin/ppapi/ppapi/generators
322 37 122 38 18
427 54 112 26 7
keywrapunwrap_stress.js
in web/jsTests/stressTests
365 86 105 29 3
pnacl_component_crx_gen.py
in plugin/ppapi/ppapi/native_client/src/untrusted/pnacl_support_extension
386 36 95 25 11
ppb_input_event_thunk.cc
in plugin/ppapi/ppapi/thunk
408 38 91 22 7
object_serialize.cc
in plugin/ppapi/ppapi/native_client/src/shared/ppapi_proxy
382 12 89 23 16
websocket_resource.cc
in plugin/ppapi/ppapi/proxy
359 25 83 23 14
pnacl_coordinator.cc
in plugin/ppapi/ppapi/native_client/src/trusted/plugin
616 29 83 13 8
377 17 77 20 8
json_manifest.cc
in plugin/ppapi/ppapi/native_client/src/trusted/plugin
415 14 77 19 13
ppb_graphics_3d_proxy.cc
in plugin/ppapi/ppapi/proxy
404 48 76 19 8
net_address_private_impl.cc
in plugin/ppapi/ppapi/shared_impl/private
382 21 76 20 20
258 35 75 29 18
service_runtime.cc
in plugin/ppapi/ppapi/native_client/src/trusted/plugin
687 27 75 11 9
idl_thunk.py
in plugin/ppapi/ppapi/generators
306 24 75 25 10
390 39 73 19 5
ppb_url_loader_proxy.cc
in plugin/ppapi/ppapi/proxy
487 34 73 15 6
browserlauncher.py
in plugin/ppapi/ppapi/native_client/tools/browser_tester/browsertester
246 28 73 30 13
encryptdecrypt_stress.js
in web/jsTests/stressTests
258 57 71 28 3
signverify_stress.js
in web/jsTests/stressTests
257 57 71 28 3
testharnessreport.js
in web/resources
298 13 70 23 16
ppb_input_event_shared.cc
in plugin/ppapi/ppapi/shared_impl
293 27 68 23 8
idl_release.py
in plugin/ppapi/ppapi/generators
223 31 68 30 10
idl_c_header.py
in plugin/ppapi/ppapi/generators
211 12 67 32 22
importexportjwk.js
in web/jsTests
513 43 66 13 7
ppp_content_decryptor_private_proxy.cc
in plugin/ppapi/ppapi/proxy
492 23 66 13 6
tcp_socket_private_impl.cc
in plugin/ppapi/ppapi/shared_impl/private
256 17 66 26 7
srpcgen.py
in plugin/ppapi/ppapi/native_client/src/tools
309 13 64 21 19
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...