Fusion.js
Unit Size

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 527 units with 7,730 lines of code in units (35.1% of code).
    • 5 very long units (1,030 lines of code)
    • 16 long units (1,099 lines of code)
    • 64 medium size units (1,930 lines of code)
    • 128 small units (1,881 lines of code)
    • 314 very small units (1,790 lines of code)
13% | 14% | 24% | 24% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
js13% | 14% | 24% | 24% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Logical Component
primary logical decomposition
fusion-cli26% | 10% | 24% | 21% | 17%
jazelle30% | 8% | 6% | 20% | 34%
fusion-core20% | 0% | 26% | 33% | 19%
fusion-plugin-rpc-redux-react0% | 59% | 23% | 14% | 2%
fusion-plugin-apollo0% | 52% | 16% | 10% | 21%
fusion-plugin-service-worker0% | 33% | 33% | 12% | 20%
fusion-rpc-redux0% | 51% | 0% | 18% | 30%
fusion-plugin-browser-performance-emitter0% | 19% | 9% | 40% | 31%
create-fusion-app0% | 89% | 0% | 0% | 10%
flow-typed0% | 0% | 56% | 29% | 14%
fusion-plugin-font-loader-react0% | 0% | 57% | 8% | 33%
fusion-react0% | 0% | 25% | 31% | 42%
fusion-plugin-i18n0% | 0% | 46% | 34% | 18%
create-fusion-plugin0% | 0% | 31% | 47% | 20%
fusion-scaffolder0% | 0% | 83% | 0% | 16%
fusion-plugin-rpc0% | 0% | 57% | 0% | 42%
fusion-plugin-react-redux0% | 0% | 24% | 33% | 42%
fusion-plugin-service-worker-tests0% | 0% | 49% | 23% | 27%
fusion-plugin-introspect0% | 0% | 33% | 66% | 0%
fusion-plugin-react-router0% | 0% | 21% | 36% | 41%
fusion-plugin-error-handling0% | 0% | 31% | 47% | 20%
fusion-plugin-node-performance-emitter0% | 0% | 0% | 29% | 70%
fusion-plugin-redux-action-emitter-enhancer0% | 0% | 0% | 80% | 20%
fusion-plugin-http-handler0% | 0% | 0% | 100% | 0%
fusion-plugin-styletron-react0% | 0% | 0% | 53% | 46%
fusion-plugin-web-app-manifest0% | 0% | 0% | 100% | 0%
fusion-plugin-universal-events0% | 0% | 0% | 0% | 100%
fusion-plugin-i18n-react0% | 0% | 0% | 0% | 100%
fusion-plugin-csrf-protection0% | 0% | 0% | 0% | 100%
fusion-plugin-jwt0% | 0% | 0% | 0% | 100%
fusion-plugin-universal-logger0% | 0% | 0% | 0% | 100%
Legend:
101+
51-100
21-50
11-20
1-10
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
function getWebpackConfig()
in fusion-cli/build/get-webpack-config.js
443 95 1
await cli()
in jazelle/index.js
217 12 6
resolve()
in fusion-core/src/base-app.js
140 37 0
function isValid()
in fusion-cli/build/load-fusionrc.js
119 34 2
function refsHandler()
in fusion-cli/build/babel-plugins/babel-plugin-i18n/index.js
111 26 4
export default()
in fusion-plugin-apollo/src/plugin.js
94 10 1
export default function getHandlers()
in fusion-plugin-service-worker/src/handlers.js
93 7 1
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
88 1 4
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
82 1 4
async function runTransformation()
in fusion-cli/build/loaders/babel-worker.js
77 11 7
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
76 1 4
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
70 1 4
apply()
in fusion-cli/build/plugins/instrumented-import-dependency-template-plugin.js
67 12 1
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
64 1 4
module.exports.pitch = function()
in fusion-cli/build/loaders/worker-loader.js
61 11 1
async function runMaster()
in jazelle/bin/cluster.js
59 11 0
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
58 1 4
apply()
in fusion-cli/build/plugins/source-map-plugin.js
53 12 1
export function createRPCHandler()
in fusion-rpc-redux/src/index.js
53 9 12
async function startServer()
in create-fusion-app/test-utils/test-utils.js
52 8 0
function getCalculatedStats()
in fusion-plugin-browser-performance-emitter/src/server.js
52 7 3
function mergeChunkMetadata()
in fusion-cli/build/merge-chunk-metadata.js
49 12 1
export default()
in fusion-plugin-service-worker/src/server.js
49 8 11
async request()
in fusion-plugin-rpc/src/server.js
47 9 2
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
47 1 4
function runCommand()
in jazelle/rules/execute-command.js
46 9 2
declare export function walkTree()
in flow-typed/npm/react-apollo_v2.x.x.js
46 1 5
async load()
in fusion-plugin-i18n/src/browser.js
45 8 1
async function loader()
in fusion-cli/build/loaders/babel-loader.js
41 6 3
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
41 1 4
declare export function getDataFromTree()
in flow-typed/npm/react-apollo_v2.x.x.js
41 1 3
function getStatsLogger()
in fusion-cli/build/compiler.js
38 7 3
export default function()
in fusion-cli/plugins/assets-plugin.js
37 6 1
function Lifecycle()
in fusion-cli/build/dev-runtime.js
37 5 0
export function generateFontFaces()
in fusion-plugin-font-loader-react/src/generate-font-faces.js
36 3 1
declare export function renderToStringWithData()
in flow-typed/npm/react-apollo_v2.x.x.js
36 1 1
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
35 1 4
function legacySSRBodyTemplate()
in fusion-core/src/plugins/ssr.js
35 1 1
constructor()
in fusion-plugin-react-redux/src/browser.js
34 9 1
export default function createSSRPlugin()
in fusion-core/src/plugins/ssr.js
33 5 7
export function loadEnv()
in fusion-core/src/get-env.js
33 5 0
apply()
in fusion-cli/build/plugins/instrumented-import-dependency-template-plugin.js
32 5 3
function swLoader()
in fusion-cli/build/loaders/sw-loader.js
32 8 0
export default()
in fusion-plugin-service-worker-tests/src/main.js
32 6 0
export default function generateFallbackMap()
in fusion-plugin-font-loader-react/src/generate-fallback-map.js
31 6 2
_register()
in fusion-core/src/base-app.js
31 6 2
middleware()
in fusion-plugin-introspect/src/server.js
30 7 1
function getClient()
in fusion-plugin-apollo/src/apollo-client/index.js
30 6 2
declare export function connect()
in fusion-plugin-rpc-redux-react/flow-typed/npm/react-redux_v7.x.x.js
29 1 4
function useFontLoading()
in fusion-plugin-font-loader-react/src/use-font-loading.js
29 6 1