repowisecitizenfx/fivem

Code health of citizenfx/fivem

Repowise scores citizenfx/fivem at 5.9 out of 10 for code health, which reads as fair, alongside maintainability 7.1 and static performance 9.7 on the same scale. There are 4,868 open findings across the three pillars, and the lowest-scoring file is ServerGameState.cpp at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

590 critical, 1,273 high, 2,294 medium, 711 low.

Hotspots

13 files are flagged as hotspots. The top 5:

  • code/components/glue/src/GtaNui.cpp: 6 commits in the last 90 days from 8 contributors with 5 recent bug fixes
  • code/components/citizen-resources-core/src/EventReassemblyComponent.cpp: 3 commits in the last 90 days from 9 contributors with 2 recent bug fixes
  • code/components/net/src/NetLibrary.cpp: 3 commits in the last 90 days from 17 contributors
  • code/components/citizen-server-impl/src/state/ServerGameState.cpp: 5 commits in the last 90 days from 28 contributors with 4 recent bug fixes
  • code/components/nui-core/src/NUIWindow.cpp: 4 commits in the last 90 days from 5 contributors with 3 recent bug fixes

Lowest-scoring files

  • code/components/citizen-server-impl/src/state/ServerGameState.cpp: 1.0 out of 10 with 4 bug fixes in the last 180 days
  • code/components/gta-streaming-five/src/LoadStreamingFile.cpp: 1.0 out of 10 with 3 bug fixes in the last 180 days
  • code/components/gta-net-five/src/CloneManager.cpp: 1.0 out of 10 with 1 bug fix in the last 180 days
  • ext/native-doc-gen/yarn_cli.js: 1.0 out of 10
  • ext/system-resources/resources/yarn/yarn_cli.js: 1.0 out of 10

Checked against bug fixes

Of the 20 files Repowise scores lowest, 9 had a bug fix in the last 180 days. Across all 2,825 scored files, 4.6% had a bug fix in that window.

Dead code and refactoring

170 refactoring targets across 170 files would raise the score.

More on fivem: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language