Skip to content

v0.0.2

Choose a tag to compare

@bsbodden bsbodden released this 04 Oct 01:32
· 38 commits to main since this release

MFCQI v0.0.2 - Enhanced OO Metrics 🎯

Expanded object-oriented analysis with Coupling Between Objects (CBO) and Lack of Cohesion of Methods (LCOM) metrics, bringing total metrics to 16 with enhanced architectural quality assessment.

What's New

🆕 Enhanced OO Metric Suite

Added two critical Chidamber & Kemerer metrics for comprehensive OO code analysis:

CBO (Coupling Between Objects) - Weight: 0.65

  • Measures inter-class coupling for architectural quality
  • Evidence: r=0.42 correlation with defects (Subramanyam & Krishnan 2003)
  • Applied to STRONG_OO and MIXED_OO paradigms

LCOM (Lack of Cohesion of Methods) - Weight: 0.50

  • Evaluates method cohesion within classes
  • Weight reduced from literature (0.60) due to mixed empirical evidence
  • Signals Single Responsibility Principle violations

📊 Updated Metric Count

16 Total Metrics (up from 14):

Complexity: Cyclomatic, Cognitive, Halstead, Maintainability Index
Quality: Duplication, Documentation, Type Safety, Code Smells
Security: Bandit SAST, pip-audit SCA, detect-secrets
OO Metrics (conditional): RFC, DIT, MHF, CBO ⭐, LCOM ⭐

🔬 Evidence-Based Weights

All metric weights now include published research citations in code comments:

CBO: r=0.42 (Subramanyam & Krishnan 2003)

RFC: r=0.48 (Subramanyam & Krishnan 2003)

Cyclomatic: r=0.65 (meta-analysis)

Cognitive: r=0.57 (Correia et al. 2022)

🐛 Fixes

  • Suppressed benign sre_constants deprecation warning (Python 3.13+)

Upgrade from v0.0.1

pip install --upgrade mfcqi

No breaking changes - existing configurations and workflows remain compatible.

Impact on Scores

OO-heavy codebases will now see:

  • More comprehensive architectural assessment
  • Lower scores if high coupling/low cohesion detected
  • Better alignment with design quality principles

MFCQI self-score: 0.88 (validated)

Development

All changes implemented using strict Test-Driven Development:

  • 3 new passing tests for CBO/LCOM integration
  • 100% test coverage maintained
  • Research-validated implementations

Documentation

Links


Made with ❤️ by https://github.com/bsbodden

Full Changelog: v0.0.1...v0.0.2

📦 PyPI Release

This release is now available on PyPI:

Quick Start

pip install mfcqi
mfcqi analyze .

What's New in v0.0.2

See the full changelog above for details.