repowisepaperless-ngx/paperless-ngx

Code health of paperless-ngx/paperless-ngx

Repowise scores paperless-ngx/paperless-ngx at 8.1 out of 10 for code health, which reads as good, alongside maintainability 8.6 and static performance 9.9 on the same scale. There are 901 open findings across the three pillars, and the lowest-scoring file is handlers.py at 2.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

110 critical, 178 high, 358 medium, 243 low.

Hotspots

129 files are flagged as hotspots. The top 5:

  • src/documents/views.py: 56 commits in the last 90 days from 7 contributors with 46 recent bug fixes
  • src/documents/tests/test_workflows.py: 16 commits in the last 90 days from 4 contributors with 10 recent bug fixes
  • src/paperless_ai/tests/test_ai_indexing.py: 14 commits in the last 90 days from 2 contributors with 8 recent bug fixes
  • src/documents/tests/test_permission_filtering_security.py: 21 commits in the last 90 days from 2 contributors with 7 recent bug fixes
  • src/documents/search/_query.py: 7 commits in the last 90 days from 3 contributors with 10 recent bug fixes

Lowest-scoring files

  • src/documents/signals/handlers.py: 2.0 out of 10 with 12 bug fixes in the last 180 days
  • src/paperless_mail/mail.py: 2.0 out of 10 with 5 bug fixes in the last 180 days
  • src/documents/bulk_edit.py: 2.0 out of 10 with 6 bug fixes in the last 180 days
  • src/documents/views.py: 2.0 out of 10 with 46 bug fixes in the last 180 days
  • src/documents/tasks.py: 2.0 out of 10 with 6 bug fixes 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 887 scored files, 13.0% had a bug fix in that window.

Dead code and refactoring

Repowise found 8 unused exports. 53 refactoring targets across 53 files would raise the score.

More on paperless-ngx: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language