Code health of opencollective/opencollective-api
Repowise scores opencollective/opencollective-api at 7.5 out of 10 for code health, which reads as good, alongside maintainability 8.5 and static performance 9.9 on the same scale. There are 2,292 open findings across the three pillars, and the lowest-scoring file is sql-search.ts at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.
Findings by severity
211 critical, 476 high, 838 medium, 702 low.
Hotspots
97 files are flagged as hotspots. The top 5:
- test/server/graphql/v2/mutation/ExpenseMutations.test.js: 13 commits in the last 90 days from 5 contributors with 4 recent bug fixes
- server/graphql/common/expenses.ts: 20 commits in the last 90 days from 6 contributors with 13 recent bug fixes
- server/graphql/v2/query/collection/OrdersCollectionQuery.ts: 5 commits in the last 90 days from 6 contributors with 7 recent bug fixes
- server/models/Collective.ts: 28 commits in the last 90 days from 6 contributors with 13 recent bug fixes
- server/graphql/v2/object/Host.ts: 9 commits in the last 90 days from 6 contributors with 4 recent bug fixes
Lowest-scoring files
- server/lib/sql-search.ts: 1.0 out of 10 with 3 bug fixes in the last 180 days
- server/models/PlatformSubscription.ts: 1.0 out of 10 with 5 bug fixes in the last 180 days
- server/graphql/common/comment.ts: 1.0 out of 10 with 2 bug fixes in the last 180 days
- server/lib/collectivelib.ts: 1.7 out of 10 with 1 bug fix in the last 180 days
- test/test-helpers/fake-data.ts: 1.8 out of 10 with 1 bug fix in the last 180 days
Checked against bug fixes
Of the 20 files Repowise scores lowest, 19 had a bug fix in the last 180 days. Across all 2,082 scored files, 10.0% had a bug fix in that window.
Dead code and refactoring
Repowise found 112 unused exports.
More on opencollective-api: summary and FAQ, codebase overview, architecture.
Related guide: Best dead code detection tools by language