JavaScript (JS) has been the most dominant language in the programming world, extending its use across diverse domains. Despite the wide usage of JavaScript, a limited study highlights the programming trends and code quality metrics and their influence on one another. Addressing this gap, we conduct an exploratory study of the code quality of open-source JavaScript projects to examine code practices across various project sizes and developer experience levels, uncovering the underlying factors impacting code quality metrics and their influence on development. We choose 200 open-source projects from GitHub, select six code evaluation tools, and perform in-depth code analysis using 10 code metrics. The analyzed code metrics include maintainability, average estimated error, lint error, cyclomatic complexity, cognitive complexity, code smell, code duplication, issue density, Line of Code (LOC), and code quality. Furthermore, we conduct an analysis of 69 open-source Continuous Integration and Continuous Deployment (CI/CD) implemented projects and compare how CI/CD practices influence code metrics. It becomes evident from the results that with the increment of project size, maintainability tends to decrease, and average estimated error, lint error, cyclomatic complexity, cognitive complexity, and code smell increase. The more experience a developer has, the better the quality of code produced. Furthermore, projects implementing a CI/CD pipeline are also seen to have better code quality metrics, indicating a direct relation between the implementation of CI/CD practices and improved software quality. This study contributes to bridging the gap between academic research and practical software development by uncovering concealed insights for better development practices. Moreover, by highlighting the recent CI/CD trends and their impact on software development, the study opens up future directions of relevant research in this domain.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

An Exploratory Study of the Code Quality of Open-Source JavaScript Projects

  • Suzad Mohammad,
  • Abdullah Al Jobair,
  • Iftekharul Abedeen

摘要

JavaScript (JS) has been the most dominant language in the programming world, extending its use across diverse domains. Despite the wide usage of JavaScript, a limited study highlights the programming trends and code quality metrics and their influence on one another. Addressing this gap, we conduct an exploratory study of the code quality of open-source JavaScript projects to examine code practices across various project sizes and developer experience levels, uncovering the underlying factors impacting code quality metrics and their influence on development. We choose 200 open-source projects from GitHub, select six code evaluation tools, and perform in-depth code analysis using 10 code metrics. The analyzed code metrics include maintainability, average estimated error, lint error, cyclomatic complexity, cognitive complexity, code smell, code duplication, issue density, Line of Code (LOC), and code quality. Furthermore, we conduct an analysis of 69 open-source Continuous Integration and Continuous Deployment (CI/CD) implemented projects and compare how CI/CD practices influence code metrics. It becomes evident from the results that with the increment of project size, maintainability tends to decrease, and average estimated error, lint error, cyclomatic complexity, cognitive complexity, and code smell increase. The more experience a developer has, the better the quality of code produced. Furthermore, projects implementing a CI/CD pipeline are also seen to have better code quality metrics, indicating a direct relation between the implementation of CI/CD practices and improved software quality. This study contributes to bridging the gap between academic research and practical software development by uncovering concealed insights for better development practices. Moreover, by highlighting the recent CI/CD trends and their impact on software development, the study opens up future directions of relevant research in this domain.