Evaluation of the level of potential complication of the code of open projects

Martin Schleiss tried to compare various open source projects in terms of code complexity and understanding how the code works and what actions it performs. For example, a project becomes more difficult to understand when complex abstractions are applied, such as the distributed interaction of components over a network, or the use of a large number of nested modules and classes.

As a metric for assessing potential complexity, we used the count of the number of imports that form an interweaving of different files. It is assumed that a person can easily parse 5-6 connections of different files, and as this indicator increases, it becomes more difficult to understand the logic.

Results obtained (complexity level is defined as the percentage of files that have links to 7 or more other files).

  • Elasticsearch - 77.2%
  • Visual Studio Code - 60.3%.
  • Rust - 58.6%
  • Linux kernel - 48.7%
  • PostgreSQL - 46.4%
  • mongoDB - 44.7%
  • Node.js - 39.9%
  • PHP - 34.4%
  • CPython - 33.1%
  • Django - 30.1%
  • reactJS - 26.7%
  • Symfony - 25.5%
  • Laravel - 22.9%
  • nextJS - 14.2%
  • chakra-ui - 13.5%

Source: opennet.ru

Add a comment