elastic / elastic-otel-php
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
phpt
txt
patch
in
editorconfig
ini
clang-format
proto
properties
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main8789 LOC (24%) 130 files
test23728 LOC (67%) 467 files
generated0 LOC (0%) 0 files
build and deployment1623 LOC (4%) 16 files
other1182 LOC (3%) 22 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 130 files match defined criteria (8,789 LOC, 100.0% vs. main code):
    • 34 *.cpp files (3,675 LOC)
    • 58 *.h files (2,682 LOC)
    • 26 *.php files (1,862 LOC)
    • 5 *.cmake files (243 LOC)
    • 2 *.py files (136 LOC)
    • 2 *.xml files (84 LOC)
    • 1 *.yaml files (54 LOC)
    • 2 *.in files (53 LOC)
  • " *.cpp" is biggest, containing 41.81% of LOC.
  • " *.in" is smallest, containing 0.6% of LOC.


*.cpp3675 LOC (41%) 34 files
*.h2682 LOC (30%) 58 files
*.php1862 LOC (21%) 26 files
*.cmake243 LOC (2%) 5 files
*.py136 LOC (1%) 2 files
*.xml84 LOC (<1%) 2 files
*.yaml54 LOC (<1%) 1 file
*.in53 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
phpt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/UnitTests?/.*".
    • files with paths like ".*UnitTests[.][a-zA-Z0-9_]+".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*[-]tests/.*".
  • 467 files match defined criteria (23,728 LOC, 270.0% vs. main code):
    • 320 *.php files (18,235 LOC)
    • 107 *.phpt files (3,390 LOC)
    • 16 *.sh files (1,043 LOC)
    • 12 *.cpp files (825 LOC)
    • 9 *.inc files (122 LOC)
    • 1 *.xml files (62 LOC)
    • 1 *.sql files (26 LOC)
    • 1 *.h files (25 LOC)
  • " *.php" is biggest, containing 76.85% of LOC.
  • " *.h" is smallest, containing 0.11% of LOC.


*.php18235 LOC (76%) 320 files
*.phpt3390 LOC (14%) 107 files
*.sh1043 LOC (4%) 16 files
*.cpp825 LOC (3%) 12 files
*.inc122 LOC (<1%) 9 files
*.xml62 LOC (<1%) 1 file
*.sql26 LOC (<1%) 1 file
*.h25 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 16 files match defined criteria (1,623 LOC, 18.5% vs. main code). All matches are in *.sh files.


*.sh1623 LOC (100%) 16 files
Other Code
txt
properties
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
  • 22 files match defined criteria (1,182 LOC, 13.4% vs. main code):
    • 3 *.json files (615 LOC)
    • 14 *.txt files (304 LOC)
    • 3 *.md files (245 LOC)
    • 1 *.properties files (10 LOC)
    • 1 *.ini files (8 LOC)
  • " *.json" is biggest, containing 52.03% of LOC.
  • " *.ini" is smallest, containing 0.68% of LOC.


*.json615 LOC (52%) 3 files
*.txt304 LOC (25%) 14 files
*.md245 LOC (20%) 3 files
*.properties10 LOC (<1%) 1 file
*.ini8 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:04