aws-samples / aws-appconfig-feature-flags
Unit Size

The distribution of size of units (measured in lines of code).

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 18 units with 432 lines of code in units (40.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (100 lines of code)
    • 7 medium size units (226 lines of code)
    • 6 small units (90 lines of code)
    • 4 very small units (16 lines of code)
0% | 23% | 52% | 20% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 23% | 52% | 20% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
frontend/src/components0% | 47% | 47% | 5% | 0%
frontend/src0% | 0% | 91% | 0% | 8%
frontend/src/pages0% | 0% | 56% | 32% | 10%
backend/src/FeatureFlagLayer0% | 0% | 0% | 100% | 0%
backend/src/getAllProducts0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
function CheckoutSummary()
in frontend/src/components/CheckoutSummary.js
100 2 1
function ProductItem()
in frontend/src/components/ProductItem.js
48 5 1
function Checkout()
in frontend/src/pages/Checkout.js
48 3 1
function registerValidSW()
in frontend/src/serviceWorker.js
33 8 2
function TopMenu()
in frontend/src/components/TopMenu.js
29 1 0
function checkValidServiceWorker()
in frontend/src/serviceWorker.js
23 4 2
function CheckoutBanner()
in frontend/src/components/CheckoutBanner.js
23 1 1
export function register()
in frontend/src/serviceWorker.js
22 5 1
async function getConfig()
in backend/src/FeatureFlagLayer/getConfig.js
18 3 0
async function getFeature()
in backend/src/FeatureFlagLayer/getFeature.js
17 4 2
async function getProducts()
in backend/src/getAllProducts/getAllProducts.js
16 2 0
function PlacedOrder()
in frontend/src/pages/PlacedOrder.js
14 1 0
function calculateTotal()
in frontend/src/pages/Checkout.js
14 2 0
function ItemTable()
in frontend/src/components/ItemTable.js
11 1 1
export function unregister()
in frontend/src/serviceWorker.js
7 2 0
function addItem()
in frontend/src/pages/Product.js
3 1 2
function handleCardUpdate()
in frontend/src/pages/Checkout.js
3 1 1
function submitOrder()
in frontend/src/pages/Checkout.js
3 1 0