ORIGINAL ARTICLE
Static Analysis of Code Quality in Open-Source Python Projects
More details
Hide details
1
Department of Software Engineering, Ostim Technical University, Ostim, 06374 Yenimahalle/Ankara, Turkiye
Submission date: 2025-09-15
Final revision date: 2025-11-08
Acceptance date: 2025-12-02
Publication date: 2025-12-31
Corresponding author
Bashir Adam Ahmed Ali
Software Engineering, Ostim Technical University, kavacik subayevleri kusadasi sk. no:38/kecioren/ a, 06000, Ankara, Turkey
Journal of Undergraduate Research International 2025;1(2):75-81
KEYWORDS
TOPICS
ABSTRACT
This study presents a systematic static analysis of code quality in two prominent open-source Python projects, Requests and BeautifulSoup. We employed a suite of static analysis tools—Radon, Pylint, and Flake8—to measure metrics including lines of code (LOC), cyclomatic complexity, maintainability index, Pylint scores, and PEP8 violations across all project modules. Automated Python scripts were developed to ensure a reproducible and comprehensive data collection process. Our analysis reveals a nuanced picture of code quality: while both projects exhibit good overall maintainability, we identified specific modules with high cyclomatic complexity and a significant number of style violations. For instance, dammit.py in BeautifulSoup4 recorded 318 PEP8 violations and a maintainability index of 40.08. The results underscore the practical value of static analysis for pinpointing refactoring candidates and enforcing coding standards. We recommend that open-source projects integrate these tools into continuous integration pipelines to proactively manage technical debt and enhance long-term maintainability. All code and data for replicating this study are publicly available.