microsoft / tolerant-php-parser
File Size

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

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 177 files with 8,176 lines of code.
    • 1 very long files (2,981 lines of code)
    • 1 long files (575 lines of code)
    • 2 medium size files (724 lines of codeclsfd_ftr_w_mp_ins)
    • 5 small files (692 lines of code)
    • 168 very small files (3,204 lines of code)
36% | 7% | 8% | 8% | 39%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
php37% | 7% | 8% | 8% | 38%
ts0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
src64% | 0% | 15% | 10% | 9%
experiments0% | 67% | 0% | 12% | 19%
src/Node0% | 0% | 0% | 12% | 87%
src/Node/Statement0% | 0% | 0% | 0% | 100%
src/Node/Expression0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
php-langspec/tools0% | 0% | 0% | 0% | 100%
syntax-visualizer/server/src0% | 0% | 0% | 0% | 100%
src/Node/DelimitedList0% | 0% | 0% | 0% | 100%
php-langspec/tools/xreference0% | 0% | 0% | 0% | 100%
validation0% | 0% | 0% | 0% | 100%
syntax-visualizer/client0% | 0% | 0% | 0% | 100%
syntax-visualizer/client/src0% | 0% | 0% | 0% | 100%
syntax-visualizer/example0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
Parser.php
in src
2981 187
Lexer.php
in experiments
575 43
Node.php
in src
408 36
PhpTokenizer.php
in src
316 8
TokenKind.php
in src
200 -
TokenStringMaps.php
in src
169 -
QualifiedName.php
in src/Node
112 9
CharacterCodes.php
in src
106 -
PhpTypeOverhead.php
in experiments
105 1
server.ts
in syntax-visualizer/server/src
78 1
MethodDeclaration.php
in src/Node
77 5
xreference.php
in php-langspec/tools/xreference
76 4
Token.php
in src
74 12
DiagnosticsProvider.php
in src
62 5
RenameNodeKindProperty.php
in tools
62 -
split.php
in php-langspec/tools
58 -
FilePositionMap.php
in src
57 8
BreakOrContinueStatement.php
in src/Node/Statement
51 1
ParserPerformance.php
in validation
47 -
PrintApiDocumentation.php
in tools
46 -
toc.php
in php-langspec/tools
41 -
Parameter.php
in src/Node
41 2
DelimitedList.php
in src/Node
38 3
NamespaceUseDeclaration.php
in src/Node/Statement
38 1
PrintInvariants.php
in tools
38 1
NamespacedNameTrait.php
in src
34 1
ClassDeclaration.php
in src/Node/Statement
33 1
ForStatement.php
in src/Node/Statement
33 -
ForeachStatement.php
in src/Node/Statement
33 -
package.php
in syntax-visualizer/client
33 1
ObjectCreationExpression.php
in src/Node/Expression
32 -
CoallesceOperatorAssociativity.php
in experiments
31 1
IfStatementNode.php
in src/Node/Statement
31 -
SwitchStatementNode.php
in src/Node/Statement
30 -
ResolvedName.php
in src
30 5
TextEdit.php
in src
30 2
c.php
in experiments
29 1
ArrowFunctionCreationExpression.php
in src/Node/Expression
29 -
EnumDeclaration.php
in src/Node/Statement
29 1
FunctionDeclaration.php
in src/Node/Statement
29 1
AnonymousFunctionCreationExpression.php
in src/Node/Expression
28 -
InterfaceDeclaration.php
in src/Node/Statement
28 1
DeclareStatement.php
in src/Node/Statement
26 -
StringLiteral.php
in src/Node
26 1
b.php
in experiments
25 2
TraitDeclaration.php
in src/Node/Statement
25 1
WhileStatement.php
in src/Node/Statement
25 -
MatchExpression.php
in src/Node/Expression
24 -
PropertyDeclaration.php
in src/Node
24 -
ConstElement.php
in src/Node
23 2
Files With Most Units (Top 20)
File# lines# units
Parser.php
in src
2981 187
Lexer.php
in experiments
575 43
Node.php
in src
408 36
Token.php
in src
74 12
QualifiedName.php
in src/Node
112 9
FilePositionMap.php
in src
57 8
PhpTokenizer.php
in src
316 8
DiagnosticsProvider.php
in src
62 5
MethodDeclaration.php
in src/Node
77 5
ResolvedName.php
in src
30 5
xreference.php
in php-langspec/tools/xreference
76 4
ModifiedTypeTrait.php
in src
22 3
DelimitedList.php
in src/Node
38 3
b.php
in experiments
25 2
MissingToken.php
in src
14 2
ConstElement.php
in src/Node
23 2
Parameter.php
in src/Node
41 2
PositionUtilities.php
in src
22 2
SkippedToken.php
in src
14 2
TextEdit.php
in src
30 2
Files With Long Lines (Top 10)

There are 10 files with lines longer than 120 characters. In total, there are 80 long lines.

File# lines# units# long lines
Parser.php
in src
2981 187 51
Lexer.php
in experiments
575 43 7
Node.php
in src
408 36 6
QualifiedName.php
in src/Node
112 9 6
PhpTokenizer.php
in src
316 8 5
CoallesceOperatorAssociativity.php
in experiments
31 1 1
FilePositionMap.php
in src
57 8 1
extension.ts
in syntax-visualizer/client/src
20 1 1
PrintApiDocumentation.php
in tools
46 - 1
RenameNodeKindProperty.php
in tools
62 - 1