Code health of frappe/erpnext
Repowise scores frappe/erpnext at 5.3 out of 10 for code health, which reads as needs work, alongside maintainability 7.2 and static performance 9.9 on the same scale. There are 5,904 open findings across the three pillars, and the lowest-scoring file is serial_batch_bundle.py at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.
Findings by severity
613 critical, 1,014 high, 2,093 medium, 1,855 low.
Hotspots
389 files are flagged as hotspots. The top 5:
- erpnext/tests/utils.py: 10 commits in the last 90 days from 7 contributors with 5 recent bug fixes
- erpnext/controllers/accounts_controller.py: 26 commits in the last 90 days from 60 contributors with 22 recent bug fixes
- erpnext/stock/doctype/stock_entry/stock_entry.py: 41 commits in the last 90 days from 37 contributors with 45 recent bug fixes
- erpnext/manufacturing/doctype/work_order/test_work_order.py: 25 commits in the last 90 days from 22 contributors with 10 recent bug fixes
- erpnext/accounts/doctype/journal_entry/journal_entry.py: 20 commits in the last 90 days from 35 contributors with 8 recent bug fixes
Lowest-scoring files
- erpnext/stock/serial_batch_bundle.py: 1.0 out of 10 with 10 bug fixes in the last 180 days
- erpnext/accounts/report/financial_statements.py: 1.0 out of 10 with 5 bug fixes in the last 180 days
- erpnext/controllers/status_updater.py: 1.0 out of 10 with 12 bug fixes in the last 180 days
- erpnext/stock/doctype/stock_entry/services/manufacturing.py: 1.0 out of 10 with 11 bug fixes in the last 180 days
- erpnext/controllers/buying_controller.py: 1.0 out of 10 with 13 bug fixes in the last 180 days
Checked against bug fixes
Of the 20 files Repowise scores lowest, 20 had a bug fix in the last 180 days. Across all 4,833 scored files, 13.8% had a bug fix in that window.
Dead code and refactoring
Repowise found 1,029 unused exports. 408 refactoring targets across 408 files would raise the score.
More on erpnext: summary and FAQ, codebase overview, architecture.
Related guide: Best dead code detection tools by language