microsoft / appcenter-sdk-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 415 units with 3,796 lines of code in units (49.6% of code).
    • 2 very long units (210 lines of code)
    • 3 long units (203 lines of code)
    • 30 medium size units (853 lines of code)
    • 64 small units (916 lines of code)
    • 316 very small units (1,614 lines of code)
5% | 5% | 22% | 24% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js8% | 8% | 19% | 25% | 37%
java0% | 0% | 23% | 21% | 54%
tsx0% | 0% | 53% | 16% | 30%
ts0% | 0% | 0% | 41% | 58%
m0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
DemoApp/app17% | 12% | 11% | 16% | 41%
TestApp/app17% | 12% | 11% | 16% | 41%
appcenter-link-scripts/src0% | 9% | 29% | 41% | 20%
TestAppTypescript/src0% | 0% | 42% | 19% | 37%
appcenter-crashes/android0% | 0% | 34% | 18% | 47%
appcenter-analytics/android0% | 0% | 27% | 25% | 47%
appcenter-crashes0% | 0% | 40% | 22% | 37%
TestApp340% | 0% | 17% | 37% | 45%
DemoApp/jest0% | 0% | 66% | 28% | 6%
TestApp/jest0% | 0% | 66% | 28% | 6%
appcenter/android0% | 0% | 22% | 20% | 56%
AppCenterReactNativeShared/android0% | 0% | 44% | 38% | 18%
appcenter-analytics0% | 0% | 0% | 48% | 51%
DemoApp/android0% | 0% | 0% | 28% | 71%
TestApp/android0% | 0% | 0% | 14% | 85%
TestAppTypescript/android0% | 0% | 0% | 24% | 76%
appcenter0% | 0% | 0% | 0% | 100%
TestApp34/android0% | 0% | 0% | 0% | 100%
TestApp34/js0% | 0% | 0% | 0% | 100%
DemoApp0% | 0% | 0% | 0% | 100%
TestApp0% | 0% | 0% | 0% | 100%
TestAppTypescript0% | 0% | 0% | 0% | 100%
DemoApp/ios0% | 0% | 0% | 0% | 100%
TestApp/ios0% | 0% | 0% | 0% | 100%
TestApp34/ios0% | 0% | 0% | 0% | 100%
TestAppTypescript/ios0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in DemoApp/app/screens/CrashesScreen.js
105 2 0
render()
in TestApp/app/screens/CrashesScreen.js
105 2 0
render()
in DemoApp/app/screens/AnalyticsScreen.js
75 1 0
render()
in TestApp/app/screens/AnalyticsScreen.js
74 1 0
removeAndroidDuplicateLinks()
in appcenter-link-scripts/src/android/index.js
54 9 0
setListener()
in appcenter-crashes/Crashes.js
47 12 1
render()
in TestAppTypescript/src/CrashesScreen.tsx
46 2 0
render()
in TestAppTypescript/src/AnalyticsScreen.tsx
41 2 0
function addConfigToProject()
in appcenter-link-scripts/src/ios/AppCenterConfig.js
41 5 1
getTextAttachmentDialog()
in TestAppTypescript/src/CrashesScreen.tsx
38 1 0
public static JSONObject convertReadableMapToJsonObject()
in appcenter-analytics/android/src/main/java/com/microsoft/appcenter/reactnative/analytics/ReactNativeUtils.java
34 9 1
process()
in DemoApp/jest/preprocessor.js
33 1 2
process()
in TestApp/jest/preprocessor.js
33 1 2
render()
in TestApp34/CrashesScreen.js
33 2 0
public static JSONArray convertReadableArrayToJsonArray()
in appcenter-analytics/android/src/main/java/com/microsoft/appcenter/reactnative/analytics/ReactNativeUtils.java
32 10 1
private static Object toObject()
in appcenter/android/src/main/java/com/microsoft/appcenter/reactnative/appcenter/ReactNativeUtils.java
32 8 2
static WritableMap convertErrorReportToWritableMap()
in appcenter-crashes/android/src/main/java/com/microsoft/appcenter/reactnative/crashes/AppCenterReactNativeCrashesUtils.java
28 4 1
Podfile.prototype.scopeRanges = function()
in appcenter-link-scripts/src/ios/PodFile.js
27 5 1
static Exception toExceptionModel()
in appcenter-crashes/android/src/main/java/com/microsoft/appcenter/reactnative/crashes/AppCenterReactNativeCrashesUtils.java
26 8 1
public static WritableMap convertJsonObjectToWritableMap()
in appcenter-crashes/android/src/main/java/com/microsoft/appcenter/reactnative/crashes/RNUtils.java
26 9 1