Download the PHP package phauthentic/cognitive-code-analysis without Composer
On this page you can find all versions of the php package phauthentic/cognitive-code-analysis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cognitive-code-analysis
Cognitive Complexity Analysis
Cognitive Code Analysis is an approach to understanding and improving code by focusing on how human cognition interacts with code. It emphasizes making code more readable, understandable, and maintainable by considering the cognitive processes of the developers who write and work with the code.
"Human short-term or working memory was estimated to be limited to 7 ± 2 variables in the 1950s. A more current estimate is 4 ± 1 constructs. Decision quality generally becomes degraded once this limit of four constructs is exceeded."
Running it
Cognitive Complexity Analysis
Generate a report, supported types are json
, csv
, html
.
You can also pass a baseline file to compare the results to. The JSON report is used as baseline. The output will now show a delta if a value was changed.
Documentation
- Cognitive Complexity Analysis
- Why bother?
- What is the difference to Cyclomatic Complexity?
- How is Cognitive Complexity calculated?
- Metrics Collected
- Result Interpretation
- Configuration
- Tuning the calculation
- Examples
- Wordpress WP_Debug_Data
- Doctrine Paginator
Resources
These pages and papers provide more information on cognitive limitations and readability and the impact on the business.
- Cognitive Complexity
- Cognitive Complexity Wikipedia
- Cognitive Complexity and Its Effect on the Code by Emanuel Trandafir.
- Human Cognitive Limitations. Broad, Consistent, Clinical Application of Physiological Principles Will Require Decision Support by Alan H. Morris.
- The Magical Number 4 in Short-Term Memory: A Reconsideration of Mental Storage Capacity by Nelson Cowan
- Neural substrates of cognitive capacity limitations by Timothy J. Buschman,a,1 Markus Siegel,a,b Jefferson E. Roy, and Earl K. Millera.
- Code Readability Testing, an Empirical Study by Todd Sedano.
- An Empirical Validation of Cognitive Complexity as a Measure of Source Code Understandability by Marvin Muñoz Barón, Marvin Wyrich, and Stefan Wagner.
- Halstead Complexity
Examples
Cognitive Metrics
Wordpress WP_Debug_Data
Doctrine Paginator
License
Copyright Florian Krämer
Licensed under the GPL3 license.
All versions of cognitive-code-analysis with dependencies
nikic/php-parser Version ^5.1
symfony/console Version ^7.1
symfony/config Version ^7.1
symfony/yaml Version ^7.1
symfony/dependency-injection Version ^7.1
symfony/messenger Version ^7.1