Code Quality Analysis

Code Quality Rankings

Comprehensive analysis of code quality metrics across different repositories and models. Rankings are based on structural complexity, semantic complexity, and overall code quality scores.

57.2

Average Functions

60.4

Average Score

26.0

Average Complexity

14.4

Avg Cognitive Score

Rank Model Name Repository Cognitive Score Cyclomatic Score Big O Penalty Final Score
Function Analysis
Total Functions: 37
Functions Analyzed: 55
High Complexity Count: 5
O(n²) Functions: 4
O(n³) Functions: 6
Violations Summary
Cognitive Violations: 4 errors 0 warnings
Cyclomatic Violations: 1 errors 0 warnings
Recommendations
  • Moderate cognitive complexity. Review functions with high nesting and branching.
  • Found 6 O(n³) functions. These may cause performance issues with large datasets.
  • Found 4 O(n²) functions. Consider optimizing for better scalability.
Function Analysis
Total Functions: 98
Functions Analyzed: 270
High Complexity Count: 33
O(n²) Functions: 46
O(n³) Functions: 20
Violations Summary
Cognitive Violations: 10 errors 5 warnings
Cyclomatic Violations: 5 errors 3 warnings
Recommendations
  • Moderate cognitive complexity. Review functions with high nesting and branching.
  • Found 20 O(n³) functions. These may cause performance issues with large datasets.
  • Found 46 O(n²) functions. Consider optimizing for better scalability.
Function Analysis
Total Functions: 52
Functions Analyzed: 59
High Complexity Count: 12
O(n²) Functions: 6
O(n³) Functions: 18
Violations Summary
Cognitive Violations: 5 errors 1 warnings
Cyclomatic Violations: 1 errors 2 warnings
Recommendations
  • Moderate cognitive complexity. Review functions with high nesting and branching.
  • Found 18 O(n³) functions. These may cause performance issues with large datasets.
  • Found 6 O(n²) functions. Consider optimizing for better scalability.
  • High big-O complexity penalty. Focus on algorithmic efficiency improvements.
Function Analysis
Total Functions: 55
Functions Analyzed: 97
High Complexity Count: 46
O(n²) Functions: 78
O(n³) Functions: 14
Violations Summary
Cognitive Violations: 3 errors 3 warnings
Cyclomatic Violations: 1 errors 1 warnings
Recommendations
  • Moderate cognitive complexity. Review functions with high nesting and branching.
  • Found 14 O(n³) functions. These may cause performance issues with large datasets.
  • Found 78 O(n²) functions. Consider optimizing for better scalability.
  • High big-O complexity penalty. Focus on algorithmic efficiency improvements.
Function Analysis
Total Functions: 44
Functions Analyzed: 104
High Complexity Count: 34
O(n²) Functions: 24
O(n³) Functions: 44
Violations Summary
Cognitive Violations: 7 errors 3 warnings
Cyclomatic Violations: 4 errors 2 warnings
Recommendations
  • High cognitive complexity detected. Consider refactoring complex functions to improve readability.
  • Moderate cyclomatic complexity. Consider simplifying conditional logic.
  • Found 44 O(n³) functions. These may cause performance issues with large datasets.
  • Found 24 O(n²) functions. Consider optimizing for better scalability.
  • High big-O complexity penalty. Focus on algorithmic efficiency improvements.

Frequently Asked Questions

Everything you need to know about this ranking and its metrics

These are specific prompts which you can find on each repository, to create a single-file, non-complex piece of code in one of the most popular languages out there. No excuses on language complexity, or lack of training data. Highly specific cognitive, cyclomatic, and big-O notation complexity gives you accuracy on the results.

It is easy to train models or adjust them to match prompts. We deserve the right to swap the prompts for which these examples were created for that reason. For LLM training, the prompt is like having the question to a final test.

Although you can generate documentation, tests, and automation with LLMs, we are testing code, and the ability of the LLM to generate good, solid code. Not an opinion on what is good, but rahter, a measurable way to determine that by amount of complex, cognitive, and big-o standards.

Metrics are calculated with the PMAT CLI tool. It has static analysis to several different types of metrics.