awslabs / aws-elasticache-cluster-client-memcached-for-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
ini
m4
  • 14 extensions are included in analyses: phpt, h, c, php, inc, txt, ini, gitignore, m4, sh, xml, markdown, yml, json
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (1 file).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (1 file).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main5577 LOC (47%) 18 files
test5213 LOC (44%) 141 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other922 LOC (7%) 3 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 18 files match defined criteria (5,577 lines of code, 100.0% vs. main code):
    • 6 *.c files (4,992 lines of code)
    • 5 *.php files (330 lines of code)
    • 7 *.h files (255 lines of code)
  • " *.c" is biggest, containing 89.51% of code.
  • " *.h" is smallest, containing 4.57% of code.


*.c4992 LOC (89%) 6 files
*.php330 LOC (5%) 5 files
*.h255 LOC (4%) 7 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 ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 141 files match defined criteria (5,213 lines of code, 93.5% vs. main code):
    • 138 *.phpt files (5,039 lines of code)
    • 3 *.inc files (174 lines of code)
  • " *.phpt" is biggest, containing 96.66% of code.
  • " *.inc" is smallest, containing 3.34% of code.


*.phpt5039 LOC (96%) 138 files
*.inc174 LOC (3%) 3 files
Other Code
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 3 files match defined criteria (922 lines of code, 16.5% vs. main code):
    • 1 *.xml files (699 lines of code)
    • 1 *.ini files (140 lines of code)
    • 1 *.markdown files (83 lines of code)
  • " *.xml" is biggest, containing 75.81% of code.
  • " *.markdown" is smallest, containing 9% of code.


*.xml699 LOC (75%) 1 files
*.ini140 LOC (15%) 1 files
*.markdown83 LOC (9%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.c files are analyzed with CStyleAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.php files are analyzed with PhpAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis


2022-01-31 18:05