SmartReview.Dev
Static analysis ready

DETERMINISTIC CODE REVIEW

Review code before it reaches production.

Catch C#, LINQ, and SQL correctness, performance, security, and maintainability issues—with guidance you can trust.

Rule profileBalanced C# and ASP.NET Core review.

REVIEW COMPLETE

A few improvements recommended

Reviewed for ASP.NET Core · Static analysis · 0 rules checked

51/100

Safety

31/100

Performance

57/100

Maintainability

66/100

What this query does

Reviews C#/.NET code for correctness, async, security, performance, reliability, and maintainability risks.

Findings

3
Blocking asynchronous workAsync

Synchronous waiting can reduce request scalability and obscure cancellation. Await the operation through the full call chain.

Sensitive value may be loggedSecurity

Authentication material or secrets must not be written to logs. Remove the field and use an allowlisted logging model.

Internal exception returned to clientSecurity

Stack traces and internal exception details can disclose implementation and infrastructure information.

Suggested rewrite

More explicit intent; validate with EXPLAIN before adopting.

public async Task<IActionResult> GetApplication(long id)
{
    try
    {
        var application = await _repository.GetAsync(id);
        _logger.LogInformation("Token: {Token}", Request.Headers.Authorization);
        return Ok(application);
    }
    catch (Exception ex)
    {
        return BadRequest(ex.ToString());
    }
}

Why this may be preferable Selecting only required columns reduces transfer. EXISTS states the intent without duplicating properties when multiple owners match. Actual performance depends on your data and indexes.

LINQ TO SQL

Preview the SQL shape before execution.

Deterministic conversion for common EF Core filters, projections, ordering, and pagination. No code leaves your browser.

C# LINQPaste an EF Core query
SQL preview
SELECT "Id", "Name", "CreatedAt"
FROM "Applications"
WHERE "CompanyId" = @companyId AND "IsActive" = TRUE
ORDER BY "CreatedAt" DESC
LIMIT 25;
Translation completed

The recognized query shape was converted successfully. Always compare this preview with EF Core ToQueryString(); mappings, converters, global filters, and relationships require runtime model metadata.

EXECUTION PLAN

Find the operators doing the expensive work.

Paste an estimated or actual plan. Analysis stays in your browser and never connects to your database.

Plan inputText, JSON, or XML-like output
Use an actual plan for row-estimate and runtime evidence.
Plan score18/100
Operators found3
Scan operators1
Worst estimate ratio154.2×
Execution time1849.73 ms

Plan findings

4
Large scan candidatewarning

1 sequential or table-scan operator was detected. A scan is not automatically bad, but it can dominate selective queries on large tables. Review guidance: Check predicates, table size, and existing indexes. Add or change an index only after confirming selectivity and write-cost tradeoffs.

Many rows removed after scanningwarning

248,000 rows were discarded by a filter after being read. Review guidance: Make the predicate indexable where appropriate and move selective filtering as early as the engine permits.

Severe row-estimate mismatchcritical

The largest detected estimate differs from actual rows by about 154× (120 estimated versus 18,500 actual). Review guidance: Refresh or improve statistics, inspect correlated predicates and parameter sensitivity, then re-check join choices with representative values.

High-frequency nested-loop executioncritical

A nested-loop branch executes up to 18,500 times, multiplying its inner work. Review guidance: Reduce outer rows, ensure the inner lookup is selective and indexed, or evaluate a set-based join strategy with current statistics.

Evidence, not certainty. Plans depend on data distribution, parameters, cache state, concurrency, and database configuration. SmartReview does not claim that an index or rewrite is faster without measurement.