STUD
← Plays

Score · Assess & Decide · Engineering

Clean-code smell scorecard for a method

A per-method clean-code smell scorecard: which thresholds each method exceeds (long method, too many arguments, deep nesting, and more), a 0-100 score, and a pass/warn/fail verdict.

You receive: A reviewed smell-scoring calculator + the passing test report, run on your method metrics.

Part of Ship MVP

Example

A sample of what this play produces. Your result is generated for your inputs.

Rows

formatCredits

Smell count
0
Score
100
Verdict
pass

parseIntakeRows

Smells
  • LongMethod
  • DeepNesting
Smell count
2
Score
60
Verdict
warn

syncCatalogDiff

Smells
  • LongMethod
  • TooManyArguments
  • TooManyAttributes
  • DeepNesting
Smell count
4
Score
20
Verdict
fail
Inputs
Methods

formatCredits

Metrics
Loc
12
Args
2
Attributes
1
Nesting
1
Comment ratio
0.2

parseIntakeRows

Metrics
Loc
34
Args
2
Attributes
3
Nesting
4
Comment ratio
0.1

syncCatalogDiff

Metrics
Loc
61
Args
5
Attributes
9
Nesting
4
Comment ratio
0.1
Thresholds
Max loc
20
Max args
3
Max attributes
8
Max nesting
3
Max comment ratio
0.5
Gates
Warn at smell count
1
Fail at smell count
3

Arithmetic recomputed against the tasks.py compute_code_smell_scorecard oracle, 2026-08-08: a metric flags a smell only when it strictly exceeds its threshold. With the default thresholds (max_loc 20, max_args 3, max_attributes 8, max_nesting 3, max_comment_ratio 0.5), formatCredits exceeds none (score 100, pass), parseIntakeRows exceeds max_loc (34 > 20) and max_nesting (4 > 3) for 2 smells (score 100*(5-2)/5 = 60, warn at the default warn_at_smell_count of 1), and syncCatalogDiff exceeds four thresholds (loc 61 > 20, args 5 > 3, attributes 9 > 8, nesting 4 > 3) for 4 smells (score 100*(5-4)/5 = 20, fail at the default fail_at_smell_count of 3). The method metrics are illustrative figures for three methods in a marketplace platform's intake, credits, and catalog sync paths, the kind STUD's own codebase carries; STUD checks the scoring on the metrics you provide, it does not extract metrics from your code.

Opens later

This play is not open to run yet, so it has no price. Leave your email and STUD will tell you when it opens.

Scope of the check

What's verified: STUD verifies the scorecard on held-out cases: each of the five metrics (length, arguments, attributes, nesting depth, comment ratio) flags a smell when it strictly exceeds your threshold, the 0-100 score is 100*(5 - smell count)/5, and the pass/warn/fail verdict follows your smell-count gates. STUD does NOT extract these metrics from real code, nor judge whether a method is genuinely clean; it checks the scoring on the metrics you provide.