microsoft / appcenter-sampleapp-react-native
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 31 units with 394 lines of code in units (43.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (64 lines of code)
    • 9 medium size units (231 lines of code)
    • 1 small units (17 lines of code)
    • 20 very small units (82 lines of code)
0% | 16% | 58% | 4% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 21% | 69% | 5% | 3%
java0% | 0% | 32% | 0% | 67%
m0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/components0% | 53% | 23% | 14% | 9%
src/screens0% | 0% | 100% | 0% | 0%
android/app/src/main/java/com/appcentersample0% | 0% | 32% | 0% | 67%
ios/AppCenterSample0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in src/components/baseScreen.tsx
64 4 0
render()
in src/screens/analyticsScreen.tsx
34 1 0
render()
in src/screens/crashesScreen.tsx
32 1 0
render()
in src/screens/codePushScreen.tsx
31 1 0
codePushStatusDidChange()
in src/components/codePush.tsx
28 9 1
public void showColoredEventsDialog()
in android/app/src/main/java/com/appcentersample/AppCenterSampleNativeModule.java
22 4 0
render()
in src/screens/buildScreen.tsx
21 1 0
render()
in src/screens/distributeScreen.tsx
21 1 0
render()
in src/screens/testScreen.tsx
21 1 0
render()
in src/screens/welcomeScreen.tsx
21 1 0
render()
in src/components/codePush.tsx
17 3 0
static void InitializeFlipper()
in ios/AppCenterSample/AppDelegate.m
9 1 1
protected ReactActivityDelegate createReactActivityDelegate()
in android/app/src/main/java/com/appcentersample/MainActivity.java
8 1 0
6 1 0
public List createNativeModules()
in android/app/src/main/java/com/appcentersample/AppCenterSamplePackage.java
5 1 1
int main()
in ios/AppCenterSample/main.m
5 1 2
protected List getPackages()
in android/app/src/main/java/com/appcentersample/MainApplication.java
4 1 0
public void onCreate()
in android/app/src/main/java/com/appcentersample/MainApplication.java
4 1 0
constructor()
in src/components/baseScreen.tsx
4 1 1
constructor()
in src/components/codePush.tsx
4 1 2