microsoft / react-native-code-push
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 892 units with 15,898 lines of code in units (55.1% of code).
    • 23 very long units (4,180 lines of code)
    • 26 long units (1,717 lines of code)
    • 147 medium size units (4,507 lines of code)
    • 199 small units (2,894 lines of code)
    • 497 very small units (2,600 lines of code)
26% | 10% | 28% | 18% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c41% | 14% | 24% | 10% | 9%
cpp9% | 3% | 46% | 23% | 17%
java6% | 8% | 33% | 22% | 29%
js9% | 0% | 36% | 20% | 32%
cs0% | 11% | 22% | 37% | 28%
h0% | 0% | 26% | 63% | 10%
m0% | 0% | 0% | 74% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
windows/CodePush35% | 15% | 28% | 10% | 10%
ios/CodePush35% | 8% | 25% | 20% | 10%
android/app6% | 8% | 33% | 22% | 29%
ROOT27% | 0% | 53% | 10% | 9%
windows-legacy/CodePush0% | 19% | 9% | 44% | 27%
windows-legacy/CodePush.Net460% | 12% | 10% | 50% | 25%
windows-legacy/CodePush.Shared0% | 7% | 36% | 24% | 31%
code-push-plugin-testing-framework/script0% | 0% | 28% | 25% | 46%
scripts/tools0% | 0% | 51% | 12% | 35%
scripts0% | 0% | 0% | 76% | 23%
Recipes0% | 0% | 0% | 0% | 100%
scripts/postlink0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
tinfl_status tinfl_decompress()
in windows/CodePush/miniz/miniz.c
449 99 7
extern int ZEXPORT zipOpenNewFileInZip4_64()
in ios/CodePush/SSZipArchive/minizip/zip.c
272 70 19
mz_bool mz_zip_writer_add_from_zip_reader()
in windows/CodePush/miniz/miniz.c
262 57 3
mz_bool mz_zip_writer_add_read_buf_callback()
in windows/CodePush/miniz/miniz.c
240 68 13
mz_bool mz_zip_writer_add_mem_ex_v2()
in windows/CodePush/miniz/miniz.c
226 77 14
extern int ZEXPORT zipCloseFileInZipRaw64()
in ios/CodePush/SSZipArchive/minizip/zip.c
199 57 3
extern int ZEXPORT unzRepair()
in ios/CodePush/SSZipArchive/minizip/mztools.c
196 32 5
local int unz64local_GetCurrentFileInfoInternal()
in ios/CodePush/SSZipArchive/minizip/unzip.c
195 78 9
static mz_bool mz_zip_reader_read_central_dir()
in windows/CodePush/miniz/miniz.c
187 58 2
extern zipFile ZEXPORT zipOpen4()
in ios/CodePush/SSZipArchive/minizip/zip.c
176 49 5
mz_bool mz_zip_reader_extract_to_callback()
in windows/CodePush/miniz/miniz.c
166 44 5
extern int ZEXPORT unzReadCurrentFile()
in ios/CodePush/SSZipArchive/minizip/unzip.c
161 38 3
mz_bool mz_zip_validate_file()
in windows/CodePush/miniz/miniz.c
156 49 3
extern int ZEXPORT unzOpenCurrentFile3()
in ios/CodePush/SSZipArchive/minizip/unzip.c
154 33 5
static mz_bool tdefl_compress_fast()
in windows/CodePush/miniz/miniz.c
151 30 1
static mz_bool tdefl_compress_normal()
in windows/CodePush/miniz/miniz.c
137 38 1
IAsyncAction CodePushPackage::DownloadPackageAsync()
in windows/CodePush/CodePushPackage.cpp
134 15 4
132 26 4
public void downloadPackage()
in android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java
132 25 4
extern int ZEXPORT zipClose()
in ios/CodePush/SSZipArchive/minizip/zip.c
119 45 2