android / compose-samples
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 343 units with 5,586 lines of code in units (27.3% of code).
    • 2 very long units (252 lines of code)
    • 17 long units (1,136 lines of code)
    • 76 medium size units (2,399 lines of code)
    • 45 small units (676 lines of code)
    • 203 very small units (1,123 lines of code)
4% | 20% | 42% | 12% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt4% | 20% | 42% | 12% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Jetcaster/app17% | 10% | 28% | 15% | 28%
Jetsnack/app8% | 25% | 39% | 14% | 11%
JetNews/app0% | 24% | 37% | 11% | 26%
Owl/app0% | 27% | 46% | 20% | 5%
Jetchat/app0% | 15% | 54% | 10% | 19%
Jetsurvey/app0% | 13% | 59% | 0% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fun EpisodeListItem()
in Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/category/PodcastCategory.kt
142 1 3
fun CartItem()
in Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/cart/Cart.kt
110 1 2
fun FeaturedCourse()
in Owl/app/src/main/java/com/example/owl/ui/courses/FeaturedCourses.kt
98 2 2
fun FilterScreen()
in Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/FilterScreen.kt
86 2 1
fun HomeContent()
in Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/Home.kt
84 5 6
fun HomeFeedWithArticleDetailsScreen()
in JetNews/app/src/main/java/com/example/jetnews/ui/home/HomeScreens.kt
77 1 3
fun HomeRoute()
in JetNews/app/src/main/java/com/example/jetnews/ui/home/HomeRoute.kt
75 1 3
fun CourseListItem()
in Owl/app/src/main/java/com/example/owl/ui/common/CourseListItem.kt
69 1 2
fun SummaryItem()
in Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/cart/Cart.kt
68 1 3
fun Messages()
in Jetchat/app/src/main/java/com/example/compose/jetchat/conversation/Conversation.kt
66 5 2
fun PostCardHistory()
in JetNews/app/src/main/java/com/example/jetnews/ui/home/PostCards.kt
65 2 2
fun JetsnackBottomBar()
in Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/Home.kt
63 3 3
fun JetnewsApp()
in JetNews/app/src/main/java/com/example/jetnews/ui/JetnewsApp.kt
60 2 2
fun FilterChip()
in Jetsnack/app/src/main/java/com/example/jetsnack/ui/components/Filters.kt
59 4 3
fun AnimatingFabContent()
in Jetchat/app/src/main/java/com/example/compose/jetchat/components/AnimatingFabContent.kt
59 6 1
fun JetsnackGradientTintedIconButton()
in Jetsnack/app/src/main/java/com/example/jetsnack/ui/components/GradientTintedIconButton.kt
53 4 2
fun Question()
in Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/survey/SurveyQuestions.kt
52 5 4
fun InterestsScreen()
in JetNews/app/src/main/java/com/example/jetnews/ui/interests/InterestsScreen.kt
51 2 4
fun SurveyQuestionsScreen()
in Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/survey/SurveyScreen.kt
51 2 3
fun CourseDetails()
in Owl/app/src/main/java/com/example/owl/ui/course/CourseDetails.kt
50 2 2