microsoft / PowerStig
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 259 files with 29,907 lines of code.
    • 3 very long files (3,999 lines of code)
    • 7 long files (4,898 lines of code)
    • 20 medium size files (6,133 lines of codeclsfd_ftr_w_mp_ins)
    • 47 small files (6,357 lines of code)
    • 182 very small files (8,520 lines of code)
13% | 16% | 20% | 21% | 28%
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
ps118% | 32% | 16% | 12% | 19%
psm19% | 0% | 26% | 29% | 34%
yml0% | 0% | 0% | 88% | 11%
psd10% | 0% | 0% | 13% | 86%
yaml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
source/Module/Rule.SqlScriptQuery85% | 0% | 11% | 0% | 3%
Tools/Release96% | 0% | 0% | 0% | 3%
source/Module/Rule.Registry50% | 26% | 17% | 0% | 4%
source/Module/STIG0% | 68% | 26% | 0% | 4%
source/Module/Common0% | 79% | 0% | 6% | 14%
source/Module/Rule.Permission0% | 64% | 19% | 10% | 5%
source/Module/Rule0% | 0% | 58% | 16% | 24%
source/Module/Rule.nxFileLine0% | 0% | 91% | 0% | 8%
ROOT0% | 0% | 68% | 21% | 10%
Tools/WikiPages0% | 0% | 100% | 0% | 0%
Tools/TestHelper0% | 0% | 100% | 0% | 0%
source/Module/Rule.WebConfigurationProperty0% | 0% | 60% | 28% | 10%
source/DSCResources0% | 0% | 100% | 0% | 0%
source/Module/Rule.UserRight0% | 0% | 42% | 36% | 21%
source/Module/Rule.ProcessMitigation0% | 0% | 49% | 36% | 13%
Tools/AppVeyor0% | 0% | 100% | 0% | 0%
source/Module/Rule.IISLogging0% | 0% | 0% | 80% | 19%
source/Module/Rule.Service0% | 0% | 0% | 79% | 20%
source/Module/Rule.RootCertificate0% | 0% | 0% | 83% | 16%
source/Module/Rule.MimeType0% | 0% | 0% | 81% | 18%
source/Module/Rule.WindowsFeature0% | 0% | 0% | 78% | 21%
source/Module/Rule.nxService0% | 0% | 0% | 76% | 23%
source/Module/Rule.SqlDatabase0% | 0% | 0% | 81% | 18%
source/Module/Rule.WebAppPool0% | 0% | 0% | 81% | 18%
source/Module/Rule.SqlLogin0% | 0% | 0% | 77% | 22%
source/DSCResources/Resources0% | 0% | 0% | 13% | 86%
source/Module/Rule.FileContent0% | 0% | 0% | 33% | 66%
source/Module/Rule.SecurityOption0% | 0% | 0% | 73% | 26%
source/Module/Rule.AccountPolicy0% | 0% | 0% | 73% | 26%
source/Module/Rule.HardCoded0% | 0% | 0% | 100% | 0%
source/Module/Rule.nxPackage0% | 0% | 0% | 45% | 54%
source/Module/Rule.AuditPolicy0% | 0% | 0% | 62% | 37%
source/Module/Rule.VsphereVssSecurity0% | 0% | 0% | 42% | 57%
source/Module/Rule.VspherePortGroupSecurity0% | 0% | 0% | 42% | 57%
source/Module/Rule.VsphereAdvancedSettings0% | 0% | 0% | 44% | 55%
source/Module/Rule.Group0% | 0% | 0% | 57% | 42%
source/Module/Rule.nxFile0% | 0% | 0% | 41% | 58%
source/Module/Rule.DnsServerSetting0% | 0% | 0% | 44% | 55%
source/Module/Rule.VsphereNtpSettings0% | 0% | 0% | 49% | 50%
source/DSCResources/WindowsServer0% | 0% | 0% | 77% | 22%
source/DSCResources/Vsphere0% | 0% | 0% | 77% | 22%
source/Module/Rule.WinEventLog0% | 0% | 0% | 49% | 50%
source/Module/Rule.SqlServerConfiguration0% | 0% | 0% | 44% | 55%
source/DSCResources/SqlServer0% | 0% | 0% | 75% | 24%
source0% | 0% | 0% | 51% | 48%
source/Module/Rule.SslSettings0% | 0% | 0% | 64% | 35%
source/Module/Rule.VsphereService0% | 0% | 0% | 0% | 100%
source/Module/Rule.SqlProtocol0% | 0% | 0% | 0% | 100%
source/Module/Rule.VsphereSnmpAgent0% | 0% | 0% | 0% | 100%
source/Module/Rule.VsphereKernelActiveDumpPartition0% | 0% | 0% | 0% | 100%
source/Module/Rule.VsphereAcceptanceLevel0% | 0% | 0% | 0% | 100%
source/Module/Rule.AuditSetting0% | 0% | 0% | 0% | 100%
source/Module/Rule.Document0% | 0% | 0% | 0% | 100%
source/DSCResources/WindowsClient0% | 0% | 0% | 0% | 100%
source/DSCResources/WindowsDnsServer0% | 0% | 0% | 0% | 100%
source/Module/Rule.DnsServerRootHint0% | 0% | 0% | 0% | 100%
source/DSCResources/IisSite0% | 0% | 0% | 0% | 100%
source/DSCResources/IisServer0% | 0% | 0% | 0% | 100%
source/DSCResources/OracleJRE0% | 0% | 0% | 0% | 100%
source/DSCResources/McAfee0% | 0% | 0% | 0% | 100%
source/DSCResources/Office0% | 0% | 0% | 0% | 100%
source/DSCResources/RHEL0% | 0% | 0% | 0% | 100%
source/DSCResources/Ubuntu0% | 0% | 0% | 0% | 100%
source/DSCResources/InternetExplorer0% | 0% | 0% | 0% | 100%
source/DSCResources/Adobe0% | 0% | 0% | 0% | 100%
source/DSCResources/DotNetFramework0% | 0% | 0% | 0% | 100%
source/DSCResources/Chrome0% | 0% | 0% | 0% | 100%
source/DSCResources/FireFox0% | 0% | 0% | 0% | 100%
source/DSCResources/Edge0% | 0% | 0% | 0% | 100%
source/DSCResources/WindowsDefender0% | 0% | 0% | 0% | 100%
source/DSCResources/WindowsFirewall0% | 0% | 0% | 0% | 100%
source/Module/Rule.Manual0% | 0% | 0% | 0% | 100%
source/Module/Rule.Skip0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
Methods.ps1
in source/Module/Rule.SqlScriptQuery/Convert
1549 -
Release.psm1
in Tools/Release
1291 -
Methods.ps1
in source/Module/Rule.Registry/Convert
1159 -
Function.RangeConversion.ps1
in source/Module/Common/Convert
921 -
Functions.Checklist.ps1
in source/Module/STIG
817 -
Functions.PowerStigXml.ps1
in source/Module/STIG/Convert
784 -
Methods.ps1
in source/Module/Rule.Permission/Convert
722 -
Functions.SingleLine.ps1
in source/Module/Rule.Registry/Convert
616 -
Functions.BackupRevert.ps1
in source/Module/STIG
524 -
Functions.XccdfXml.ps1
in source/Module/Common
514 -
WikiPages.psm1
in Tools/WikiPages
490 -
TestHelper.psm1
in Tools/TestHelper
476 -
Methods.ps1
in source/Module/Rule.WebConfigurationProperty/Convert
428 -
RegistryRule.Convert.psm1
in source/Module/Rule.Registry/Convert
404 -
ConvertFactory.psm1
in source/Module/Rule/Convert
401 -
build.ps1
in root
372 -
STIG.psm1
in source/Module/STIG
364 -
Rule.psm1
in source/Module/Rule
363 -
Methods.ps1
in source/Module/Rule.nxFileLine/Convert
288 -
helper.psm1
in source/DSCResources
277 -
Resolve-Dependency.ps1
in root
256 -
Functions.DomainName.ps1
in source/Module/STIG
239 -
nxFileLineRule.Convert.psm1
in source/Module/Rule.nxFileLine/Convert
233 -
Methods.ps1
in source/Module/Rule.UserRight/Convert
229 -
Functions.RuleQuery.ps1
in source/Module/STIG
229 -
AppVeyor.psm1
in Tools/AppVeyor
220 -
Methods.ps1
in source/Module/Rule.ProcessMitigation/Convert
220 -
Data.ps1
in source/Module/Rule.nxFileLine/Convert
218 -
PermissionRule.Convert.psm1
in source/Module/Rule.Permission/Convert
217 -
SqlScriptQueryRule.Convert.psm1
in source/Module/Rule.SqlScriptQuery/Convert
209 -
azure-pipelines.yml
in root
198 -
WebConfigurationPropertyRule.Convert.psm1
in source/Module/Rule.WebConfigurationProperty/Convert
198 -
UserRightRule.Convert.psm1
in source/Module/Rule.UserRight/Convert
195 -
Methods.ps1
in source/Module/Rule.Service/Convert
193 -
IISLoggingRule.Convert.psm1
in source/Module/Rule.IISLogging/Convert
190 -
Methods.ps1
in source/Module/Rule.IISLogging/Convert
178 -
windows.AccessControl.ps1
in source/DSCResources/Resources
165 -
FileContentRule.Convert.psm1
in source/Module/Rule.FileContent/Convert
164 -
ProcessMitigationRule.Convert.psm1
in source/Module/Rule.ProcessMitigation/Convert
164 -
SecurityOptionRule.Convert.psm1
in source/Module/Rule.SecurityOption/Convert
161 -
AccountPolicyRule.Convert.psm1
in source/Module/Rule.AccountPolicy/Convert
159 -
RootCertificateRule.Convert.psm1
in source/Module/Rule.RootCertificate/Convert
159 -
Methods.ps1
in source/Module/Rule.RootCertificate/Convert
156 -
Methods.ps1
in source/Module/Rule.WindowsFeature/Convert
154 -
ServiceRule.Convert.psm1
in source/Module/Rule.Service/Convert
152 -
Methods.ps1
in source/Module/Rule.MimeType/Convert
151 -
MimeTypeRule.Convert.psm1
in source/Module/Rule.MimeType/Convert
149 -
nxServiceRule.Convert.psm1
in source/Module/Rule.nxService/Convert
145 -
WindowsFeatureRule.Convert.psm1
in source/Module/Rule.WindowsFeature/Convert
144 -
HardCodedRule.Convert.psm1
in source/Module/Rule.HardCoded/Convert
140 -
Files With Most Units (Top 0)
File# lines# units
Files With Long Lines (Top 20)

There are 89 files with lines longer than 120 characters. In total, there are 631 long lines.

File# lines# units# long lines
Data.ps1
in source/Module/Rule.nxFileLine/Convert
218 - 194
Methods.ps1
in source/Module/Rule.SqlScriptQuery/Convert
1549 - 55
Functions.Checklist.ps1
in source/Module/STIG
817 - 45
Functions.BackupRevert.ps1
in source/Module/STIG
524 - 28
build.ps1
in root
372 - 15
Resolve-Dependency.ps1
in root
256 - 13
Methods.ps1
in source/Module/Rule.WebConfigurationProperty/Convert
428 - 13
Methods.ps1
in source/Module/Rule.ProcessMitigation/Convert
220 - 12
Methods.ps1
in source/Module/Rule.Registry/Convert
1159 - 12
Methods.ps1
in source/Module/Rule.Permission/Convert
722 - 10
Functions.PowerStigXml.ps1
in source/Module/STIG/Convert
784 - 10
nxFileLineRule.Convert.psm1
in source/Module/Rule.nxFileLine/Convert
233 - 9
STIG.psm1
in source/Module/STIG
364 - 8
PowerStig.psd1
in source
101 - 7
WikiPages.psm1
in Tools/WikiPages
490 - 6
Methods.ps1
in source/Module/Rule.RootCertificate/Convert
156 - 6
Methods.ps1
in source/Module/Rule.VspherePortGroupSecurity/Convert
93 - 6
Functions.RuleQuery.ps1
in source/Module/STIG
229 - 6
Function.RangeConversion.ps1
in source/Module/Common/Convert
921 - 5
Functions.XccdfXml.ps1
in source/Module/Common
514 - 5