Public report — Ghost, published 25 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this survey Filed cd_b3b58914635c4eab966151acbd872d05 Filed 25 September 2026, 12:07 UTC Public

TryGhost/Ghost

Measured 25 September 2026, 10:50 UTC

45% At Risk

Large · 433,986 LoC · rebuild ~6.4 person-years · weakest lens: Architecture (39%)

Findings by grade

173 critical 4243 serious 337 minor 47 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 September 2026, 10:50 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

49/52dimensions tool-verifieddeterministic · confidence 1.0 · 3 LLM-assisted, advisory
4565findings with an exact file:lineof 4753 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
52/133dimensions across the health lenses433986 LoC — wide & deep
Chapters

Executive summary

⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.

This system is a large, high-value asset carrying significant risk, reflected in an overall health score of 45%. With nearly 6.4 person-years of logic embedded, the cost to rebuild is substantial, making the current state fragile. The primary danger is not immediate failure, but a slow erosion of delivery speed and increased operational costs due to structural weaknesses.

The most critical issue is architectural fragility. The architecture lens scores poorly, meaning changes ripple unpredictably through the codebase. This creates a velocity tax on every modification, likely increasing effort by 11–25% compared to a clean system. For a team changing millions of lines annually, this inefficiency compounds into a massive, recurring cost in delayed features and higher defect rates. The weakest point here is the lack of clear boundaries, where modules depend on internal paths rather than public interfaces, creating tight coupling that resists change.

A secondary concern is the high cost of basic maintenance. While documentation and maturity are strong, the underlying code quality is poor. This means new engineers face a steep learning curve, and simple fixes require disproportionate effort. The financial impact is clear: addressing the top-ranked import violations costs only a few engineer-days but prevents thousands of days of annual drag. This single action pays for itself within months, offering immediate leverage by removing a bottleneck that slows every subsequent change.

Strengths lie in the system’s maturity and security posture, which are generally sound. The code is well-documented, and security exposure is low, providing a stable foundation for operations. However, these positives do not offset the architectural debt. The picture is partial, as domain modeling and event-driven patterns were not measured, leaving some risks unquantified.

Focus first on fixing the import violations and moving shared test helpers. This low-effort, high-impact action breaks the worst coupling and immediately improves developer velocity. It is the highest-leverage move available, turning a significant annual cost into a one-time fix. Prioritizing this ensures the team can deliver value faster without incurring further technical debt.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Architecture 39% · 46% weightAccessibility 42% · 25% weightReadiness 46% · 14% weightCode Health 63% · 8% weightSecurity 75% · 4% weightMaturity 79% · 2% weight

Raise Architecture 39 → 70 (the Healthy floor) ⇒ headline 45 → ~50.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

4386 finding(s) are new versus the previous scan (2026-08-06) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · linkSubscription (cyclomatic 131) ghost/core/core/server/services/members/members-api/repositories/member-repository.js
  • D1 · save-engine.createSaveEngine (cyclomatic 130) apps/admin/src/editor/engine/save-engine.ts
  • D1 · onSaving (cyclomatic 120) ghost/core/core/server/models/post.js
  • D1 · theme-code-editor-modal.ThemeCodeEditorModal (cyclomatic 113) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx
  • D1 · feed-item.FeedItem (cyclomatic 109) apps/activitypub/src/components/feed/feed-item.tsx
  • D1 · api.setupGhostApi (cyclomatic 107) apps/portal/src/utils/api.js
  • D1 · newsletter-preview-content.NewsletterPreviewContent (cyclomatic 98) REDACTED
  • D1 · reader.Reader (cyclomatic 92) REDACTED
  • D1 · editor-session.createEditorSession (cyclomatic 92) apps/admin/src/editor/session/editor-session.ts
  • D1 · tag-detail.TagDetail (cyclomatic 87) apps/admin/src/tags/detail/tag-detail.tsx
  • D1 · notifications.Notifications (cyclomatic 86) apps/activitypub/src/views/notifications/notifications.tsx
  • D1 · filters.Filters (cyclomatic 84) apps/shade/src/components/patterns/filters.tsx
  • D1 · domain.Domain (cyclomatic 83) apps/activitypub/src/views/preferences/components/domain.tsx
  • D1 · new-note-modal.NewNoteModal (cyclomatic 79) apps/activitypub/src/components/modals/new-note-modal.tsx
  • D1 · tier-detail-modal.TierDetailModalContent (cyclomatic 79) apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx
  • D1 · filters.FilterValueSelector (cyclomatic 79) apps/shade/src/components/patterns/filters.tsx
  • D1 · post-preview-modal.PostPreviewModal (cyclomatic 77) apps/admin/src/editor/preview/post-preview-modal.tsx
  • D1 · member-detail.MemberDetailPage (cyclomatic 75) apps/admin/src/members/detail/member-detail.tsx
  • D1 · editor.AutomationEditorContent (cyclomatic 74) apps/admin/src/automations/editor.tsx
  • D1 · gift-page.GiftPage (cyclomatic 73) apps/portal/src/components/pages/gift-page.tsx
  • D1 · add-offer-modal.AddOfferModal (cyclomatic 72) apps/admin/src/settings/growth/offers/add-offer-modal.tsx
  • D1 · global-settings.GlobalSettings (cyclomatic 69) apps/admin/src/settings/site/design-and-branding/global-settings.tsx
  • D1 · user-detail-modal.UserDetailModalContent (cyclomatic 69) apps/admin/src/settings/general/user-detail-modal.tsx
  • D1 · newsletter.Newsletter (cyclomatic 66) apps/admin/src/posts/analytics/newsletter/newsletter.tsx
  • D1 · edit-retention-offer-modal.EditRetentionOfferModal (cyclomatic 66) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx
  • D1 · change-tracker.createChangeTracker (cyclomatic 63) apps/admin/src/editor/engine/change-tracker.ts
  • D1 · description.getDescription (cyclomatic 61) ghost/core/core/frontend/meta/description.js
  • D1 · settings-modal.SettingsModal (cyclomatic 59) apps/shade/src/components/patterns/settings-modal.tsx
  • D1 · profile-page.ProfilePage (cyclomatic 58) apps/activitypub/src/views/profile/components/profile-page.tsx
  • D1 · profile.ProfileCard (cyclomatic 57) apps/activitypub/src/views/preferences/components/profile.tsx
  • D1 · newsletters-kpis.NewsletterKPIs (cyclomatic 57) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx
  • D1 · publish-options.createPublishOptions (cyclomatic 57) apps/admin/src/editor/publish/publish-options.ts
  • D1 · import-members-modal.ImportMembersModal (cyclomatic 55) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx
  • D1 · update (cyclomatic 55) ghost/core/core/server/services/members/members-api/repositories/member-repository.js
  • D1 · mapping-step.MappingStep (cyclomatic 54) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx
  • D1 · newsletter-detail-modal.Sidebar (cyclomatic 53) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx
  • D1 · authors.extendModel (cyclomatic 53) ghost/core/core/server/models/relations/authors.js
  • D1 · service.createLlmsService (cyclomatic 53) ghost/core/core/frontend/services/llms/service.js
  • D1 · slug-machine.createSlugMachine (cyclomatic 52) apps/admin/src/editor/engine/slug-machine.ts
  • D1 · posts.default (cyclomatic 52) ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js
  • D1 · ghost_head (cyclomatic 52) ghost/core/core/frontend/helpers/ghost_head.js
  • D1 · import-members-modal.ImportMembersModal (cyclomatic 51) apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx
  • D1 · overview.Overview (cyclomatic 50) apps/admin/src/posts/analytics/overview/overview.tsx
  • D1 · use-publish-flow.usePublishFlow (cyclomatic 50) apps/admin/src/editor/publish/use-publish-flow.ts
  • D1 · App.fetchQueryStrData (cyclomatic 50) REDACTED
  • D1 · newsletter-preview.NewsletterPreview (cyclomatic 49) apps/admin/src/settings/email/newsletters/newsletter-preview.tsx
  • D1 · session-service.createSessionService (cyclomatic 49) ghost/core/core/server/services/auth/session/session-service.js
  • D1 · member-activity.ActivityPage (cyclomatic 48) apps/admin/src/members/activity/member-activity.tsx
  • D1 · App.fetchLinkData (cyclomatic 48) REDACTED
  • D1 · permissible (cyclomatic 48) ghost/core/core/server/models/user.js
  • D1 · reader.ArticleBody (cyclomatic 47) REDACTED
  • D1 · member-event.getAction (cyclomatic 47) apps/admin/src/members/detail/member-event.ts
  • D1 · edit-profile.EditProfile (cyclomatic 45) apps/activitypub/src/views/preferences/components/edit-profile.tsx
  • D1 · automation-canvas.AutomationCanvas (cyclomatic 45) apps/admin/src/automations/components/canvas/automation-canvas.tsx
  • D1 · search.Search (cyclomatic 44) apps/activitypub/src/components/modals/search.tsx
  • D1 · source-utils.processSources (cyclomatic 44) apps/admin-x-framework/src/utils/source-utils.ts
  • D1 · post-editor.PostEditor (cyclomatic 44) apps/admin/src/editor/post-editor.tsx
  • D1 · chip-picker.ChipPicker (cyclomatic 44) apps/admin/src/shared/pickers/chip-picker.tsx
  • D1 · note.Note (cyclomatic 43) apps/activitypub/src/views/feed/note.tsx
  • D1 · sidebar.Sidebar (cyclomatic 43) apps/admin/src/settings/layout/sidebar.tsx
  • D1 · post-analytics-header.PostAnalyticsHeader (cyclomatic 43) apps/admin/src/posts/analytics/components/post-analytics-header.tsx
  • D1 · ParseMemberEventHelper.getAction (cyclomatic 43) apps/ember-admin/app/helpers/parse-member-event.js
  • D1 · paid-subscription-change-chart.PaidMembersChangeChart (cyclomatic 42) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx
  • D1 · update-flow-modal.KeyedUpdateFlowModal (cyclomatic 42) apps/admin/src/editor/publish/update-flow-modal.tsx
  • D1 · comments.commentMapper (cyclomatic 42) ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js
  • D1 · #mapPosts (cyclomatic 42) ghost/core/core/server/services/posts/posts-exporter.js
  • D1 · latest-post.LatestPost (cyclomatic 41) apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx
  • D1 · email-content-modal.EmailContentModal (cyclomatic 41) apps/admin/src/automations/components/email-modal/email-content-modal.tsx
  • D1 · profile.Profile (cyclomatic 40) apps/activitypub/src/views/preferences/components/profile.tsx
  • D1 · custom-field-modal.CustomFieldModal (cyclomatic 40) apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx
  • D1 · MembersCSVImporter.writeRows (cyclomatic 40) ghost/core/core/server/services/members/import-export/import/importer.ts
  • D1 · ProductRepository.update (cyclomatic 40) ghost/core/core/server/services/members/members-api/repositories/product-repository.js
  • D1 · title.getTitle (cyclomatic 40) ghost/core/core/frontend/meta/title.js
  • D1 · create (cyclomatic 40) ghost/core/core/server/services/members/members-api/repositories/member-repository.js
  • D1 · feed-item.renderFeedAttachment (cyclomatic 39) apps/activitypub/src/components/feed/feed-item.tsx
  • D1 · growth.Growth (cyclomatic 39) apps/admin/src/analytics/views/stats/growth/growth.tsx
  • D1 · LexicalEditorController.saveTask (cyclomatic 39) REDACTED
  • D1 · filters.ResolvedSelectOptionsPopover (cyclomatic 39) apps/shade/src/components/patterns/filters.tsx
  • D1 · reactAppConfig (cyclomatic 39) configs/eslint-react/index.mjs
  • D1 · profile-preview-hover-card.ProfilePreviewHoverCard (cyclomatic 38) apps/activitypub/src/components/global/profile-preview-hover-card.tsx
  • D1 · web.Web (cyclomatic 38) apps/admin/src/posts/analytics/web/web.tsx
  • D1 · members.MembersPage (cyclomatic 38) apps/admin/src/members/members.tsx
  • D1 · welcome-email-customize-modal.WelcomeEmailCustomizeModal (cyclomatic 38) apps/admin/src/settings/membership/member-emails/welcome-email-customize-modal.tsx
  • D1 · app.App (cyclomatic 38) apps/comments-ui/src/app.tsx
  • D1 · notification.NotificationText (cyclomatic 38) apps/portal/src/components/notification.jsx
  • D1 · email-sending-status-provider.EmailSendingStatusProvider (cyclomatic 37) apps/admin/src/posts/analytics/email-sending-status/email-sending-status-provider.tsx
  • D1 · getTemplateData (cyclomatic 37) ghost/core/core/server/services/email-service/email-renderer.js
  • D1 · change-password-form.ChangePasswordForm (cyclomatic 36) apps/admin/src/settings/general/users/change-password-form.tsx
  • D1 · add-offer-modal.Sidebar (cyclomatic 36) apps/admin/src/settings/growth/offers/add-offer-modal.tsx
  • D1 · access.Access (cyclomatic 36) apps/admin/src/settings/membership/access.tsx
  • D1 · api.setupGhostApi (cyclomatic 36) apps/comments-ui/src/utils/api.ts
  • D1 · PopupContent.render (cyclomatic 36) REDACTED
  • D1 · foreach.foreach (cyclomatic 36) ghost/core/core/frontend/helpers/foreach.js
  • D1 · design-and-theme-modal.DesignAndThemeModal (cyclomatic 35) apps/admin/src/settings/site/design-and-theme-modal.tsx
  • D1 · signup-options.SignupOptions (cyclomatic 35) apps/admin/src/settings/membership/portal/signup-options.tsx
  • D1 · tiers.Tiers (cyclomatic 35) apps/admin/src/settings/membership/tiers.tsx
  • D1 · locale-validation.validateLocale (cyclomatic 35) apps/admin/src/settings/utils/locale-validation.ts
  • D1 · gift-redemption-page.GiftRedemptionPage (cyclomatic 35) apps/portal/src/components/pages/gift-redemption-page.jsx
  • D1 · PostsStatsService.getTopPostsViews (cyclomatic 35) ghost/core/core/server/services/stats/posts-stats-service.js
  • D1 · unblock-dialog.UnblockDialog (cyclomatic 34) apps/activitypub/src/views/profile/components/unblock-dialog.tsx

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €310,000–€1,600,000
Cost to rebuild€310,000–€1,600,000 (3.1–9.7 person-years (5,149–16,336 h), ~3–13 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 45% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~6.4 person-years of build effort (about ~€930,000 to rebuild). Its weakest lens is Architecture at 39% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — DDD/clean architecture × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with feature.js, top-content.tsx.
+4.1 pts · REDACTED effort · Change Coupling
2
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (26 rows); move the shared test helper into a source directory production code may depend on (1 row).
+6.2 pts · REDACTED effort · Import Boundaries
3
Break each cycle by extracting the shared piece into a module both sides can import.
+6.2 pts · REDACTED effort · Circular Imports

Diagnosis — what's actually going on

Value concentrated against a weak lens · REDACTED · Value at risk
This is a Large asset (~6.4 person-years to rebuild), and its weakest lens is Architecture at 39%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~6.4 person-years rebuild (433,986 LoC) · weakest lens: Architecture 39%
→ Direct remediation budget at Architecture first — highest risk-reduction per euro on an asset this size.
A velocity tax on every change · REDACTED · Economics
The code-quality signals (complexity, duplication, cohesion) average 3.6/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 11–25% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2 code quality: averaging 3.6/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
The top fix pays for itself · REDACTED · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 1920.8–11524.7 engineer-days every year, paid as drag on the ~7,032,589 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 11–25% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 1,734,063 line(s) changed over a 90-day window ⇒ ~7,032,589/year · D1/D2 code quality: averaging 3.6/10 ⇒ a 11–25% drag on each change · top-ranked remediation: REDACTED effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · REDACTED · Leverage
Of everything flagged, the best return on effort is: Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (26 rows); move the shared test helper into a source directory production code may depend on (1 row). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (26 rows); move the shared test helper into a source directory production code may depend on (1 row).

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

2316 modules, 1381 dependencies. 1 dependency cycle across 2 modules, marked above the diagonal.

Showing the 40 most-connected modules; 2276 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 apps.admin-x-framework.src.api2 apps.admin-x-framework.src.hooks3 apps.admin-x-framework.src.utils.api.hooks4 apps.admin.src.editor.card-config5 apps.admin.src.editor.engine.save-engine6 apps.admin.src.editor.publish.components7 apps.admin.src.editor.publish.flow-post8 apps.admin.src.editor.publish.publish-options9 apps.admin.src.posts.list.hooks10 apps.admin.src.posts.list.post-resource11 apps.ember-admin.app.adapters.member12 apps.ember-admin.app.adapters.page13 apps.ember-admin.app.adapters.user14 apps.shade.src.components.patterns.filters15 apps.shade.src.components.ui16 apps.shade.test.unit.utils.test-utils17 e2e.data-factory.factory18 ghost.core.core.server.data.seeders.importers.table-importer19 ghost.core.core.server.services.jobs-service.job20 ghost.core.core.server.services.members.import-export.import.importer21 ghost.core.core.server.services.offers.domain.models.shared.value-object22 koenig.kg-default-nodes.src.nodes.audio.audio-renderer23 packages.adapters.route-settings-base.src.base24 apps.activitypub.src.api.activitypub25 apps.admin.src.editor26 apps.admin.src.editor.publish27 apps.admin.src.editor.session28 apps.admin.src.editor.settings29 apps.admin.src.layout.app-sidebar30 apps.admin.src.members31 apps.admin.src.posts.list32 apps.admin.src.posts.list.components33 apps.ember-admin.app.routes.authenticated34 e2e.data-factory.factories.comment-factory35 e2e.helpers.pages.base-page36 apps.admin.src.shared.filter-sources37 e2e.data-factory38 e2e.helpers.pages.admin.admin-page39 e2e.helpers.pages.portal.portal-page40 e2e.helpers.pages.admin.posts.post.post-editor-page
1 apps.admin-x-framework.src.api
2 apps.admin-x-framework.src.hooks
3 apps.admin-x-framework.src.utils.api.hooks
4 apps.admin.src.editor.card-config
5 apps.admin.src.editor.engine.save-engine
6 apps.admin.src.editor.publish.components
7 apps.admin.src.editor.publish.flow-post
8 apps.admin.src.editor.publish.publish-options
9 apps.admin.src.posts.list.hooks
10 apps.admin.src.posts.list.post-resource
11 apps.ember-admin.app.adapters.member
12 apps.ember-admin.app.adapters.page
13 apps.ember-admin.app.adapters.user
14 apps.shade.src.components.patterns.filters
15 apps.shade.src.components.ui
16 apps.shade.test.unit.utils.test-utils
17 e2e.data-factory.factory
18 ghost.core.core.server.data.seeders.importers.table-importer
19 ghost.core.core.server.services.jobs-service.job
20 ghost.core.core.server.services.members.import-export.import.importer
21 ghost.core.core.server.services.offers.domain.models.shared.value-object
22 koenig.kg-default-nodes.src.nodes.audio.audio-renderer
23 packages.adapters.route-settings-base.src.base
24 apps.activitypub.src.api.activitypub1
25 apps.admin.src.editor611
26 apps.admin.src.editor.publish136
27 apps.admin.src.editor.session24
28 apps.admin.src.editor.settings11
29 apps.admin.src.layout.app-sidebar2
30 apps.admin.src.members12
31 apps.admin.src.posts.list71
32 apps.admin.src.posts.list.components1
33 apps.ember-admin.app.routes.authenticated1
34 e2e.data-factory.factories.comment-factory1
35 e2e.helpers.pages.base-page1
36 apps.admin.src.shared.filter-sources11172
37 e2e.data-factory1
38 e2e.helpers.pages.admin.admin-page11
39 e2e.helpers.pages.portal.portal-page11
40 e2e.helpers.pages.admin.posts.post.post-editor-page1531
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…n-x-framework.src.api…x-framework.src.hooks…k.src.utils.api.hooks…rc.editor.card-config…or.engine.save-engine…or.publish.components…tor.publish.flow-post…blish.publish-options….src.posts.list.hooks…ts.list.post-resource…n.app.adapters.member…min.app.adapters.page…min.app.adapters.user…ents.patterns.filters…ade.src.components.ui…unit.utils.test-utils….data-factory.factory…orters.table-importer…ices.jobs-service.job…xport.import.importer…s.shared.value-object….audio.audio-renderer…ettings-base.src.base…b.src.api.activitypubapps.admin.src.editor…in.src.editor.publish…in.src.editor.session…n.src.editor.settings…rc.layout.app-sidebarapps.admin.src.members….admin.src.posts.list…posts.list.components….routes.authenticated…ories.comment-factory…lpers.pages.base-page…shared.filter-sourcese2e.data-factory…ages.admin.admin-page…es.portal.portal-page…post.post-editor-page…n-x-framework.src.api1…x-framework.src.hooks2…k.src.utils.api.hooks3…rc.editor.card-config4…or.engine.save-engine5…or.publish.components6…tor.publish.flow-post7…blish.publish-options8….src.posts.list.hooks9…ts.list.post-resource10…n.app.adapters.member11…min.app.adapters.page12…min.app.adapters.user13…ents.patterns.filters14…ade.src.components.ui15…unit.utils.test-utils16….data-factory.factory17…orters.table-importer18…ices.jobs-service.job19…xport.import.importer20…s.shared.value-object21….audio.audio-renderer22…ettings-base.src.base23…b.src.api.activitypub24apps.admin.src.editor25…in.src.editor.publish26…in.src.editor.session27…n.src.editor.settings28…rc.layout.app-sidebar29apps.admin.src.members30….admin.src.posts.list31…posts.list.components32….routes.authenticated33…ories.comment-factory34…lpers.pages.base-page35…shared.filter-sources36e2e.data-factory37…ages.admin.admin-page38…es.portal.portal-page39…post.post-editor-page401611136241121271111111172111111531+2276 more modules (most-connected shown)

At a glance — Code Health · 63% · Adequate · gated by D2 ·

At a glance — Architecture · 39% · Weak · gated by R11, R9 ·

At a glance — Maturity · 79% · Strong ·

At a glance — Readiness · 46% · Weak · gated by R8, P3 ·

At a glance — Security · 75% · Adequate · gated by D29 ·

At a glance — Accessibility · 42% · Weak · gated by AC4 ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2021 — Injection829REDACTED / Critical
A05:2021 — Security Misconfiguration15REDACTED / Critical
A02:2021 — Cryptographic Failures6REDACTED / Critical
A04:2021 — Insecure Design5REDACTED
A06:2021 — Vulnerable & Outdated Components2REDACTED / Critical

Roadmap

First, resolve import boundary violations by routing through public entry points and reorganizing shared test helpers to prevent production dependencies. Next, break circular imports by extracting shared logic into independent modules to stabilize the codebase. Then, improve keyboard accessibility by ensuring custom controls are operable and anchors have valid hrefs, while enforcing these standards via linting and CI gates. Finally, correct page structure by adding required landmarks, titles, and language attributes to ensure semantic correctness.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with feature.js, top-content.tsx.+4.1 ptsREDACTEDChange Coupling
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (26 rows); move the shared test helper into a source directory production code may depend on (1 row).+6.2 ptsREDACTEDImport Boundaries
Break each cycle by extracting the shared piece into a module both sides can import.+6.2 ptsREDACTEDCircular Imports
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.9 ptsREDACTEDKeyboard semantics
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+4.9 ptsREDACTEDA11y enforcement
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+4.9 ptsREDACTEDPage structure
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+4.7 ptsREDACTEDText alternatives
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+4.6 ptsREDACTEDForms & labels

File quality

Per-file score 0–10 — a quality signature. Of 999 files carrying findings, judged against the Production bar: 1% slop · 71% mixed · 28% near-clean.

FileScoreBandWorst signal
REDACTED2.7SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): REDACTED: REDACTED
apps/admin/src/editor/publish/publish-flow.component.test.tsx3.0SlopTest Quality: No assertions (empty test): rechecks limit readiness when the mounted flow moves to another post
REDACTED3.7SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED3.7SlopIaC & Container Security: REDACTED IaC: REDACTED
REDACTED4.0MixedData Compliance (PII/GDPR): REDACTED: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.1MixedIaC & Container Security: REDACTED IaC: REDACTED
koenig/koenig-lexical/test/e2e/cards/callout-card.test.ts5.2MixedTest Quality: Assertions commented out: colour picker renders all colours
REDACTED5.3MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.4MixedStatic Analysis (SAST): REDACTED: REDACTED
apps/activitypub/src/hooks/use-activity-pub-queries.ts5.5MixedCyclomatic Complexity: use-activity-pub-queries.useDeleteMutationForUser (cyclomatic 29)
apps/activitypub/src/components/feed/feed-item.tsx5.6MixedCyclomatic Complexity: feed-item.FeedItem (cyclomatic 109)
REDACTED5.6MixedIaC & Container Security: REDACTED IaC: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): REDACTED: REDACTED
apps/admin/src/editor/session/editor-session.ts5.7MixedCyclomatic Complexity: editor-session.createEditorSession (cyclomatic 92)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 173

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 4243

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 337

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 47

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 49 of 52 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 52 dimensions across the health lenses
D1D2D3D9D10D12D13D14D15D16D17D19D21D28D29D30D31D32D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX5M1M2M3M4P1P3P4P6R1R10R11R2R3R4R6R7R8R9S1

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 4565 of 4753 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0d82f-f962-748b-8a1e-f449fa463b58.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for apps/admin-x-framework/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (.github/codecov.yml) and a coverage step in CI (`codecov/codecov-action`) shows coverage is measured in your own CI. Commit the lcov/Cobertura report it produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/activitypub/ was NOT MEASURED: the dependency install for apps/activitypub/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/admin/ was NOT MEASURED: the dependency install for apps/admin/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/admin-toolbar/ was NOT MEASURED: the dependency install for apps/admin-toolbar/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/admin-x-framework/ was NOT MEASURED: the dependency install for apps/admin-x-framework/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/announcement-bar/ was NOT MEASURED: the dependency install for apps/announcement-bar/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/comments-ui/ was NOT MEASURED: the dependency install for apps/comments-ui/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/portal/ was NOT MEASURED: the dependency install for apps/portal/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/shade/ was NOT MEASURED: the dependency install for apps/shade/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in apps/sodo-search/ was NOT MEASURED: the dependency install for apps/sodo-search/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in configs/vite-public-app/ was NOT MEASURED: the dependency install for configs/vite-public-app/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "pnpm-lock.yaml" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: D22 has no public-API collector for any other ecosystem, and the remedy is to write one — no change to the scan image can close it.
  • D32 Data Compliance (PII/GDPR) — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `apps/admin-x-framework/src/utils/api/fetch-api.ts`, `apps/admin-x-framework/src/utils/deferred.ts`, `apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx`, `apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx`, `apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx`, … (+149 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC1 Text alternatives — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1102 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC1 Text alternatives — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository builds user interface as HTML STRINGS — 10 script file(s) building 36 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. REDACTED, apps/admin/src/settings/growth/embed-signup/embed-signup-preview.tsx, apps/admin/src/settings/site/design-and-branding/theme-preview.tsx) — that this run could NOT read, and the accessibility cards beside it were measured over the 1102 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC2 Forms & labels — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1102 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC2 Forms & labels — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository builds user interface as HTML STRINGS — 10 script file(s) building 36 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. REDACTED, apps/admin/src/settings/growth/embed-signup/embed-signup-preview.tsx, apps/admin/src/settings/site/design-and-branding/theme-preview.tsx) — that this run could NOT read, and the accessibility cards beside it were measured over the 1102 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC2 Forms & labels — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 40 further occurrence(s) are not listed individually; the score already reflects all 80.
  • AC3 Page structure — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1102 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC3 Page structure — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository builds user interface as HTML STRINGS — 10 script file(s) building 36 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. REDACTED, apps/admin/src/settings/growth/embed-signup/embed-signup-preview.tsx, apps/admin/src/settings/site/design-and-branding/theme-preview.tsx) — that this run could NOT read, and the accessibility cards beside it were measured over the 1102 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC3 Page structure — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 114 further occurrence(s) are not listed individually; the score already reflects all 154.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1102 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository builds user interface as HTML STRINGS — 10 script file(s) building 36 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. REDACTED, apps/admin/src/settings/growth/embed-signup/embed-signup-preview.tsx, apps/admin/src/settings/site/design-and-branding/theme-preview.tsx) — that this run could NOT read, and the accessibility cards beside it were measured over the 1102 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 60 further occurrence(s) are not listed individually; the score already reflects all 100.
  • AC5 ARIA correctness — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1102 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC5 ARIA correctness — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository builds user interface as HTML STRINGS — 10 script file(s) building 36 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. REDACTED, apps/admin/src/settings/growth/embed-signup/embed-signup-preview.tsx, apps/admin/src/settings/site/design-and-branding/theme-preview.tsx) — that this run could NOT read, and the accessibility cards beside it were measured over the 1102 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1102 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository builds user interface as HTML STRINGS — 10 script file(s) building 36 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. REDACTED, apps/admin/src/settings/growth/embed-signup/embed-signup-preview.tsx, apps/admin/src/settings/site/design-and-branding/theme-preview.tsx) — that this run could NOT read, and the accessibility cards beside it were measured over the 1102 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, and .astro/.templ/.pug/.jade/.haml/.slim; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
  • AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • AX4 Dependency direction — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • DM1 Aggregate boundaries — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored for TypeScript: a class holding another class reads the same whether the inner type is an aggregate or a value object, so this cannot be decided from source without guessing — reported as guidance rather than measured.
  • DM2 Strongly-typed ids — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored for TypeScript: branded ids (`type Id = string & { __brand }`) are an uncommon idiom, so a bare-string id is not on its own evidence of a missing typed id — reported as guidance rather than measured.
  • DM3 Integration-event coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored for TypeScript: a domain type used across packages is indistinguishable in source from a deliberate shared-kernel package, so this is reported as guidance rather than measured.
  • DM4 Rich vs anemic model — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored for TypeScript: telling a rich domain entity from an anemic data holder needs the behaviour a source-only read cannot always attribute (components, DTOs and readonly value objects are all legitimately data-shaped), so this is reported as guidance rather than measured.
  • DM5 Encapsulated state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored for TypeScript: the language already steers state behind #private/private/readonly, so a mutable public field is rare enough that we report this as guidance rather than measuring it.
  • DM7 Repository granularity — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored for TypeScript: deciding whether a repository belongs to an aggregate root needs the aggregate structure, which source alone does not state — reported as guidance rather than measured.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1017 further occurrence(s) are not listed individually; the score already reflects all 1057.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 689 further occurrence(s) are not listed individually; the score already reflects all 729.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 465 further occurrence(s) are not listed individually; the score already reflects all 505.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations: 23 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity4.4 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 4.4 / 10 · rule-coverage 100% · ceiling Prevented

431 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was linkSubscription at 131. A further 10 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being events.default at 34 — they are counted neither in the figure above nor in this dimension's score. 9 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: ghost/core/core/server/models/base/plugins/events.js (events.default at 34), ghost/core/core/server/models/base/plugins/crud.js (crud.default at 30), ghost/core/core/server/models/base/plugins/generate-slug.js (generate-slug.default at 27), ghost/core/core/server/models/base/plugins/sanitize.js (sanitize.default at 27), apps/portal/src/components/pages/gift/form-state.ts (form-state.parseGiftFormState at 21), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

linkSubscription (cyclomatic 131)ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223
save-engine.createSaveEngine (cyclomatic 130)apps/admin/src/editor/engine/save-engine.ts:364
onSaving (cyclomatic 120)ghost/core/core/server/models/post.js:572
theme-code-editor-modal.ThemeCodeEditorModal (cyclomatic 113)apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298
feed-item.FeedItem (cyclomatic 109)apps/activitypub/src/components/feed/feed-item.tsx:506

+ 392 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 linkSubscription (cyclomatic 131) finding(s) in Cyclomatic Complexity — start with member-repository.js. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 save-engine.createSaveEngine (cyclomatic 130) finding(s) in Cyclomatic Complexity — start with save-engine.ts. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 onSaving (cyclomatic 120) finding(s) in Cyclomatic Complexity — start with post.js. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.9 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.9 / 10 · rule-coverage 100% · ceiling Prevented

520 method(s) exceeded the cognitive complexity threshold of 15; the worst was linkSubscription at 191.

App.componentDidUpdate (cognitive 20) · ×2REDACTED:125
linkSubscription (cognitive 191)ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223
save-engine.createSaveEngine (cognitive 149)apps/admin/src/editor/engine/save-engine.ts:364
onSaving (cognitive 135)ghost/core/core/server/models/post.js:572
theme-code-editor-modal.ThemeCodeEditorModal (cognitive 127)apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298

+ 461 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 App.componentDidUpdate (cognitive 20) finding(s) in Cognitive Complexity — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 linkSubscription (cognitive 191) finding(s) in Cognitive Complexity — start with member-repository.js. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 save-engine.createSaveEngine (cognitive 149) finding(s) in Cognitive Complexity — start with save-engine.ts. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes5.6 / 10Adequate✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.6 / 10 · rule-coverage 100% · ceiling Prevented

238 god class(es) detected.

FunctionTooLong: dots-pattern.DotsPatternn · ×165apps/activitypub/src/views/preferences/components/dots-pattern.tsx:6
FileTooLong: components/dots-pattern.tsx · ×43apps/activitypub/src/views/preferences/components/dots-pattern.tsx
MethodTooLong: ProductRepository.update · ×13ghost/core/core/server/services/members/members-api/repositories/product-repository.js:374
ClassTooLong: App · ×10REDACTED:85
TooManyMethods: LexicalEditorController · ×7REDACTED:148

What to do

  1. Resolve the 165 FunctionTooLong finding(s) in God Classes — start with use-activity-pub-queries.ts (3), api.js (2), sidebar.tsx (2). — One of this dimension's main actionable groups (165 warning-level).
  2. Resolve the 43 FileTooLong finding(s) in God Classes — start with dots-pattern.tsx, filters.tsx, schema.js. — One of this dimension's main actionable groups (43 warning-level).
  3. Resolve the 13 MethodTooLong finding(s) in God Classes — start with product-repository.js (2), REDACTED (2), importer.ts (2). — One of this dimension's main actionable groups (13 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution9.1 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Documented

21810 test methods: 19486 unit, 772 integration, 307 BDD, 1245 e2e. The JavaScript/TypeScript suite contributes 21810 `it`/`test` case(s) across 1949 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality8.8 / 10Adequategated by 16 critical findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 100% · ceiling Prevented

120 skipped (120 with a documented reason), 1746 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 21789 tests (1 harness-style project(s) excluded from the assertion penalty).

No assertions (empty test): holds the input shut until the generator answers · ×14apps/admin/src/editor/editor-settings-url.acceptance.test.tsx:207
Assertions commented out: can upload an image · ×2koenig/koenig-lexical/test/e2e/cards/markdown-card.test.ts:207
No assertions: hands the analytics action back to the Admin host · ×1710apps/activitypub/test/acceptance/error.test.ts:9
No direct assertions: registerDefaultTransforms() registers all transforms · ×20koenig/kg-default-transforms/test/kg-default-transforms.test.ts:5
Test project verifies nothing: koenig/kg-default-transformskoenig/kg-default-transforms/test/kg-default-transforms.test.ts:5

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 14 No assertions (empty test) finding(s) in Test Quality — start with publish-flow.component.test.tsx (7), site-exporter.test.ts (2), jobs-service.test.ts (2). — One of this dimension's main actionable groups (14 issue-level).
  2. Resolve the 2 Assertions commented out finding(s) in Test Quality — start with markdown-card.test.ts, callout-card.test.ts. — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1710 No assertions finding(s) in Test Quality — start with comments.test.js (61), members.test.js (53), ghost-head.test.js (52). — One of this dimension's main actionable groups (1710 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene8.0 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

166 outdated direct production npm dependency(ies) of 277 graded, 0 pinning defect(s), across 53 package.json (49 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded: this dimension grades what SHIPS. Whether any of these packages is DEPRECATED or UNMAINTAINED is not graded — registry.npmjs.org's latest-version answer carries neither, and release age does not stand in for a maintenance status. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Outdated (npm): @aws-sdk/client-s3 · ×166

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

1 of 277 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 277 production dependency(ies) this repository's committed lockfile resolves, across 49 product package.json manifest(s). Its 819 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 3 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.

Banned license: ua-parser-js

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 337 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: apps/admin/src/editor/session/editor-session.ts (26×92=2392); apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx (25×79=1975); apps/admin/src/settings/general/user-detail-modal.tsx (26×69=1794)

Hotspot: apps/admin/src/editor/session/editor-session.ts · ×337apps/admin/src/editor/session/editor-session.ts:216

What to do

  1. Resolve the 337 Hotspot finding(s) in Churn × Complexity Hotspots — start with api.js (2), overview.tsx (2), import-members-modal.tsx (2). — One of this dimension's main actionable groups (337 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.2 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Documented

115 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is apps/portal/src/components/pages/gift-page.styles.js. Counted over 1508 of the 3944 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×9
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Stronggated by 32 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

32 deducted task-comment markers across 230274 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×32apps/activitypub/src/api/activitypub.ts:331

What to do

  1. Resolve the 32 TodoComment finding(s) in Explicit Debt — start with limit-service.test.ts (2), activitypub.ts, suggested-profiles.tsx. — One of this dimension's main actionable groups (32 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

This Ghost monorepo is well documented: the READMEs cover installation, usage, contributing, license, architecture, and design documentation; there are detailed per-package guides for scripts, internal packages, e2e testing, repository structure, and a dedicated metafield-types package. The documents are complete and well ordered with clear headings and an outline for each one. The documentation is comprehensive and well-structured for a monorepo of shared packages: each README covers what the package does, gives install/usage examples (with code), explains measured vs read values, and documents develop/run steps. The architecture/design docs are also present but not shown in this summary.

Documentation: no project overview · ×4README.md

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)5.0 / 10Adequate✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged REDACTED. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

934 finding(s): 0 critical, 13 high, 914 medium, 7 low. semgrep hit a parse error in 167 file(s) — `.agents/setup` (lines 2–40), `.devcontainer/start-dev-stack.sh` (line 9), `apps/admin-x-framework/src/utils/api/fetch-api.ts` (line 126), `apps/admin-x-framework/src/utils/deferred.ts` (line 10), `apps/admin/src/analytics/utils/content-helpers.test.ts` (line 56, line 112), … (+162 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 7 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 809 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (101), REDACTED (34), REDACTED (31). — One of this dimension's main actionable groups (809 warning-level).
  2. Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (13 issue-level).
  3. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (7 recommendation-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities8.8 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir/Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex, Go, Java and Kotlin via Maven/Gradle, npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 2 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 2 REDACTED CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security6.7 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.7 / 10 · rule-coverage 100% · ceiling Documented

15 finding(s): 1 critical, 6 high, 6 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 REDACTED IaC finding(s) in IaC & Container Security — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 1 Critical IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 6 REDACTED IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (6 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D32 · Data Compliance (PII/GDPR)6.0 / 10Adequate✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 0 high, 5 medium, 0 low. semgrep could not parse 154 file(s) — `apps/admin-x-framework/src/utils/api/fetch-api.ts`, `apps/admin-x-framework/src/utils/deferred.ts`, `apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx`, `apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx`, `apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx`, … (+149 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 5 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

6 of 1508 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is ghost/core/core/server/services/newsletters/emails/verify-email.js. Counted over 1508 of the 3944 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.9 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: editor.screen.ts↔post-settings-sidebar.tsx 83%; table-lists.js↔schema.js 82%; locations.tsx↔sources.tsx 80%

Boundary-crossing change coupling: feature.js ↔ labs.js · ×2apps/ember-admin/app/services/feature.js
Change coupling: settings-fields.ts ↔ editor.ts · ×15apps/admin/src/editor/session/settings-fields.ts
Change-coupling hub: editor-session.ts → editor-screen.tsx, post-settings-sidebar.tsx, editor.ts · ×4apps/admin/src/editor/session/editor-session.ts

What to do

  1. Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with feature.js, top-content.tsx. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 15 Change coupling finding(s) in Change Coupling — start with settings-fields.ts (2), koenig-editor-base.tsx (2), table-lists.js. — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with editor-session.ts, editor.screen.ts, stats.js. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives5.0 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). (×2) — apps/activitypub/src/components/feed/feed-item.tsx:176, apps/activitypub/src/components/feed/feed-item.tsx:443
  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×22) — apps/activitypub/src/components/feed/feed-item.tsx:428, apps/activitypub/src/components/feed/feed-item.tsx:437, apps/activitypub/src/components/feed/feed-item.tsx:463, …
  • An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. (×2) — apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:223, apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:281

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.8 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×2) — apps/activitypub/src/components/feed/feed-item.tsx:734, apps/activitypub/src/components/layout/layout.tsx:85
  • This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — apps/activitypub/src/components/layout/sidebar/sidebar.tsx:66
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×3) — apps/activitypub/src/components/modals/new-note-modal.tsx:394, apps/admin/src/members/label-picker/label-picker.tsx:349, apps/comments-ui/src/components/popups/add-details-popup.tsx:203
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×3) — apps/activitypub/src/views/preferences/components/profile.tsx:463, apps/activitypub/src/views/preferences/components/profile.tsx:476, apps/activitypub/src/views/preferences/components/profile.tsx:515
  • This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×8) — apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:267, apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:407, apps/admin/src/editor/publish/components/publish-at-options.tsx:25, …
  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×3) — apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:196, apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx:618, apps/portal/src/components/pages/account-plan-page.jsx:229
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — apps/comments-ui/src/components/content/buttons/more-button.tsx:24, apps/comments-ui/src/components/popups/close-button.tsx:9
  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. (×3) — REDACTED:2, REDACTED:1, REDACTED:11
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×12) — REDACTED:6, REDACTED:10, REDACTED:83, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — apps/ember-admin/app/components/gh-input-with-select/index.hbs:2, REDACTED:35
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — apps/portal/src/components/common/date-picker.jsx:436

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure4.4 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×4) — .github/embed-renderer/404.html:2, REDACTED:2, REDACTED:2, …
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×8) — .github/embed-renderer/404.html:2, apps/admin/index.html:2, apps/ember-admin/app/index.html:2, …
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×7) — apps/admin/index.html:8, apps/comments-ui/src/components/frame.tsx:28, apps/ember-admin/app/index.html:10, …
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×2) — REDACTED:57, REDACTED:47
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×19) — REDACTED:258, REDACTED:107, REDACTED:115, …

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.9 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: interactive elements plus elements the markup gives a click/key handler or the repo's own CSS styles `cursor: pointer`, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×34) — apps/activitypub/src/components/activities/activity-item.tsx:21, apps/activitypub/src/components/feed/feed-item.tsx:136, apps/activitypub/src/components/feed/feed-item.tsx:163, …
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×2) — apps/activitypub/src/components/feed/table-of-contents.tsx:193, apps/activitypub/src/components/layout/onboarding/step-3.tsx:389
  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. — apps/activitypub/src/components/layout/error/error.tsx:119
  • This <div> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it. — apps/activitypub/src/views/notifications/components/notification-item.tsx:32
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. — apps/activitypub/src/views/preferences/components/edit-profile.tsx:284
  • This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. — apps/activitypub/src/views/preferences/components/settings.tsx:179

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness7.8 / 10Strong✓ Tool-verified

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The combobox role requires aria-expanded to convey its state. Add it. (×2) — apps/admin/src/members/label-picker/label-picker.tsx:337, apps/admin/src/settings/advanced/history-modal.tsx:279

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety7.9 / 10Strong✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. (×2) — apps/activitypub/src/components/layout/onboarding/step-3.tsx:130, apps/activitypub/src/components/layout/onboarding/step-3.tsx:231
  • `.kg-header-card.kg-style-image` sets color: #ffffff on background-color: #e7e7eb — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — ghost/core/core/server/services/email-service/email-templates/partials/styles.hbs:1
  • outline:none/0 in an inline style removes the keyboard focus ring with no chance of a :focus replacement. Keep a visible focus indicator. (×2) — REDACTED:49, REDACTED:65
  • `.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus` sets color: #fff on background-color: #428bca — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — apps/ember-admin/app/styles/components/pagination.css:54

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 1102 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition8.3 / 10Strong✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

M1 · Documentation (README)8.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 10 of 52 project(s) that lack one — worth up to 0.4 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 197511 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

R1 · Type Safety5.2 / 10Adequate✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 3034 typed · 2796 plain JS — the untyped files are apps/admin-toolbar/src/actions.js, apps/admin-toolbar/src/auth.js, apps/admin-toolbar/src/components.js, apps/admin-toolbar/src/config.js, apps/admin-toolbar/src/constants.js, apps/admin-toolbar/src/icons.js (+2790 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.8 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • 90 duplicated blocks under apps/admin/src/ have copies in at least two of the sibling directories analytics, automations, comments, editor, global-search, hooks (+8 more sibling(s) not listed) — 56 of them are reported below, and 34 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 90 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 90 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 90 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/admin/src/automations/components/email-modal/email-content-modal.tsx:33
  • 80 duplicated blocks under apps/ have copies in at least two of the sibling directories activitypub, admin, admin-toolbar, admin-x-framework, announcement-bar, comments-ui (+5 more sibling(s) not listed) — 55 of them are reported below, and 25 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 80 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 80 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 80 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/admin/src/members/detail/member-event.ts:136
  • 59 duplicated blocks under ghost/core/core/server/services/ have copies in at least two of the sibling directories audience-feedback, auth, comments, content-import, donations, email-analytics (+33 more sibling(s) not listed) — 28 of them are reported below, and 31 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 59 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 59 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 59 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — ghost/core/core/server/services/newsletters/newsletters-service.js:18
  • 50 duplicated blocks under apps/admin/src/settings/ have copies in at least two of the sibling directories advanced, components, email, email-design, general, growth (+3 more sibling(s) not listed) — 25 of them are reported below, and 25 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 50 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 50 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 50 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/admin/src/settings/advanced/history-modal.tsx:109
  • 31 duplicated blocks under ghost/core/core/server/data/migrations/versions/ have copies in at least two of the sibling directories 5.0, 5.10, 5.100, 5.102, 5.11, 5.113 (+34 more sibling(s) not listed) — 19 of them are reported below, and 12 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 31 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — ghost/core/core/server/data/migrations/versions/5.3/2022-07-06-09-26-add-ghost-explore-integration-api-key.js:10
  • 15 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, ghost, koenig — 9 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/comments-ui/tailwind.config.js:1
  • 15 duplicated blocks under ghost/core/core/server/ have copies in at least two of the sibling directories adapters, api, data, lib, models, services (+1 more sibling(s) not listed) — 4 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — ghost/core/core/server/models/user.js:1021
  • 12 duplicated blocks under apps/activitypub/src/views/ have copies in at least two of the sibling directories feed, inbox, notifications, preferences, profile — 11 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/activitypub/src/views/feed/components/feed-list.tsx:34
  • 9 duplicated blocks under apps/shade/src/components/ have copies in at least two of the sibling directories layout, patterns, ui — 3 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/shade/src/components/patterns/filters.tsx:1855
  • 8 duplicated blocks under apps/activitypub/src/ have copies in at least two of the sibling directories components, views — 5 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/activitypub/src/components/global/suggested-profiles.tsx:22
  • 7 duplicated blocks under apps/ember-admin/app/ have copies in at least two of the sibling directories components, controllers, helpers, instance-initializers, services — 3 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/ember-admin/app/components/editor/modals/re-verify.js:9
  • 7 duplicated blocks under ghost/core/core/ have copies in at least two of the sibling directories frontend, server, shared — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — ghost/core/core/frontend/services/data/match-permalink-params.js:6
  • 6 duplicated blocks under apps/admin/src/posts/analytics/ have copies in at least two of the sibling directories growth, hooks, newsletter, overview, web — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/admin/src/posts/analytics/hooks/use-post-newsletter-stats.ts:61
  • 5 duplicated blocks under apps/admin/src/analytics/views/stats/ have copies in at least two of the sibling directories growth, locations, newsletters, overview, web — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/admin/src/analytics/views/stats/growth/growth.tsx:230
  • apps/admin/src/automations/components/email-modal/email-content-modal.tsx:33 · apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:35 — the two spans are one implementation copied and then locally edited — 1388 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/automations/components/email-modal/email-content-modal.tsx:33
  • apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:126 · apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:201 — the two spans are one implementation copied and then locally edited — 1167 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:126
  • apps/admin/src/members/detail/member-detail.tsx:75 · apps/admin/src/tags/detail/tag-detail.tsx:58 — the two spans are one implementation copied and then locally edited — 847 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/members/detail/member-detail.tsx:75
  • apps/shade/src/components/ui/context-menu.tsx:8 · apps/shade/src/components/ui/dropdown-menu.tsx:8 — the two spans are one implementation copied and then locally edited — 875 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/shade/src/components/ui/context-menu.tsx:8
  • ghost/core/core/server/api/endpoints/utils/serializers/input/pages.js:14 · ghost/core/core/server/api/endpoints/utils/serializers/input/posts.js:14 — the two spans are one implementation copied and then locally edited — 1005 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ghost/core/core/server/api/endpoints/utils/serializers/input/pages.js:14
  • ghost/core/core/server/adapters/redirects/S3RedirectsStore.ts:30 · ghost/core/core/server/adapters/route-settings/S3RouteSettingsStore.ts:38 — the two spans are one implementation copied and then locally edited — 919 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ghost/core/core/server/adapters/redirects/S3RedirectsStore.ts:30
  • apps/comments-ui/tailwind.config.js:1 · koenig/kg-unsplash-selector/tailwind.config.cjs:1 — these 2 files are line-for-line copies of one another — 131 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/comments-ui/tailwind.config.js:1
  • apps/admin/src/settings/email/newsletters.tsx:21 · apps/admin/src/settings/email/newsletters/newsletters-tab-content.tsx:20 — the two spans are one implementation copied and then locally edited — 685 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/settings/email/newsletters.tsx:21
  • apps/admin/src/members/detail/member-event.ts:136 · apps/ember-admin/app/helpers/parse-member-event.js:87 — the two spans are one implementation copied and then locally edited — 615 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/members/detail/member-event.ts:136
  • apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:94 · apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx:425 — the two spans are one implementation copied and then locally edited — 611 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:94
  • apps/ember-admin/app/components/editor/modals/re-verify.js:9 · apps/ember-admin/app/controllers/signin-verify.js:12 — the two spans are one implementation copied and then locally edited — 551 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/ember-admin/app/components/editor/modals/re-verify.js:9
  • apps/admin/src/automations/components/email-modal/use-email-preview.ts:20 · apps/admin/src/settings/membership/member-emails/use-welcome-email-preview.ts:23 — the two spans are one implementation copied and then locally edited — 618 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/automations/components/email-modal/use-email-preview.ts:20
  • apps/admin-x-framework/src/utils/source-utils.ts:43 · ghost/core/core/server/services/stats/referrers-stats-service.js:7 — the two spans are one implementation copied and then locally edited — 580 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin-x-framework/src/utils/source-utils.ts:43
  • ghost/core/core/frontend/src/cards/js/audio.js:1 · ghost/core/core/frontend/src/cards/js/video.js:1 — the two spans are one implementation copied and then locally edited — 683 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ghost/core/core/frontend/src/cards/js/audio.js:1
  • ghost/core/core/server/models/label.js:14 · ghost/core/core/server/models/tag.js:73 — the two spans are one implementation copied and then locally edited — 644 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ghost/core/core/server/models/label.js:14
  • apps/admin-x-framework/src/api/pages.ts:46 · apps/admin-x-framework/src/api/posts.ts:63 — the two spans are one implementation copied and then locally edited — 681 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin-x-framework/src/api/pages.ts:46
  • apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245 · apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:370 — the two spans are one implementation copied and then locally edited — 553 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245
  • apps/admin/src/automations/components/email-modal/preview-frame.tsx:1 · apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:1 — these 2 files are line-for-line copies of one another — 90 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/admin/src/automations/components/email-modal/preview-frame.tsx:1
  • apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83 · apps/admin/src/posts/analytics/web/components/sources.tsx:76 — the two spans are one implementation copied and then locally edited — 427 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83
  • ghost/core/core/server/services/stripe/stripe-migrations.js:305 · ghost/core/core/server/services/stripe/stripe-migrations.js:395 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ghost/core/core/server/services/stripe/stripe-migrations.js:305
  • apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:35 · apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:61 — the two spans are one implementation copied and then locally edited — 474 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:35
  • apps/comments-ui/src/actions.ts:310 · apps/comments-ui/src/actions.ts:418 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — apps/comments-ui/src/actions.ts:310
  • ghost/core/core/server/api/endpoints/labels.js:36 · ghost/core/core/server/api/endpoints/tags.js:20 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — ghost/core/core/server/api/endpoints/labels.js:36
  • apps/admin/src/settings/growth/offers/offers-index.tsx:108 · apps/admin/src/settings/growth/offers/offers-index.tsx:202 — the two spans are one implementation copied and then locally edited — 299 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/admin/src/settings/growth/offers/offers-index.tsx:108
  • apps/comments-ui/src/components/popups/delete-popup.tsx:1 · apps/comments-ui/src/components/popups/report-popup.tsx:1 — these 2 files are line-for-line copies of one another — 70 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/comments-ui/src/components/popups/delete-popup.tsx:1
  • apps/admin/src/settings/general/seo-meta.tsx:252 · apps/admin/src/settings/general/seo-meta.tsx:333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/admin/src/settings/general/seo-meta.tsx:252

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • apps/admin/vite.shared.ts:33 imports mingo/dist/mingo.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/admin/vite.shared.ts:33
  • apps/ember-admin/app/routes/posts.js:2 imports ember-infinity/lib/infinity-model, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/ember-admin/app/routes/posts.js:2
  • apps/ember-admin/ember-cli-build.js:7 imports ember-cli/lib/broccoli/ember-app, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/ember-admin/ember-cli-build.js:7
  • ghost/core/core/server/data/db/better-sqlite3-patches.js:199 imports knex/lib/dialects/better-sqlite3/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/core/server/data/db/better-sqlite3-patches.js:199
  • ghost/core/core/server/data/importer/importers/data/data-importer.js:18 imports @tryghost/string/lib, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/core/server/data/importer/importers/data/data-importer.js:18
  • ghost/core/core/server/data/migrations/init/2-create-fixtures.js:1 imports ghost/core/core/server/data/schema/fixtures/index.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — ghost/core/core/server/data/migrations/init/2-create-fixtures.js:1
  • ghost/core/core/server/models/base/plugins/overrides.js:1 imports bookshelf/lib/constants, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/core/server/models/base/plugins/overrides.js:1
  • ghost/core/core/server/services/email-address/email-address-parser.ts:1 imports nodemailer/lib/addressparser, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/core/server/services/email-address/email-address-parser.ts:1
  • ghost/core/core/server/services/users.js:7 imports @tryghost/domain-events/lib/DomainEvents, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/core/server/services/users.js:7
  • koenig/kg-default-cards/src/cards/audio.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/audio.ts:1
  • koenig/kg-default-cards/src/cards/before-after.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/before-after.ts:1
  • koenig/kg-default-cards/src/cards/bookmark.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/bookmark.ts:2
  • koenig/kg-default-cards/src/cards/button.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/button.ts:1
  • koenig/kg-default-cards/src/cards/callout.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/callout.ts:1
  • koenig/kg-default-cards/src/cards/code.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/code.ts:1
  • koenig/kg-default-cards/src/cards/email-cta.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/email-cta.ts:2
  • koenig/kg-default-cards/src/cards/email.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/email.ts:1
  • koenig/kg-default-cards/src/cards/embed.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/embed.ts:1
  • koenig/kg-default-cards/src/cards/file.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/file.ts:1
  • koenig/kg-default-cards/src/cards/gallery.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/gallery.ts:8
  • koenig/kg-default-cards/src/cards/header.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/header.ts:1
  • koenig/kg-default-cards/src/cards/html.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/html.ts:1
  • koenig/kg-default-cards/src/cards/image.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/image.ts:8
  • koenig/kg-default-cards/src/cards/markdown.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/markdown.ts:2
  • koenig/kg-default-cards/src/cards/product.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/product.ts:1
  • koenig/kg-default-cards/src/cards/toggle.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/toggle.ts:1
  • koenig/kg-default-cards/src/cards/video.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/video.ts:1

What to do

  • Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (26 rows); move the shared test helper into a source directory production code may depend on (1 row).
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • linkSubscription has cyclomatic complexity 124 and cognitive complexity 179; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223
  • onSaving has cyclomatic complexity 113 and cognitive complexity 123; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ghost/core/core/server/models/post.js:572
  • (anonymous) has cyclomatic complexity 98 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:56
  • FeedItem has cyclomatic complexity 82 and cognitive complexity 102; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/activitypub/src/components/feed/feed-item.tsx:506
  • Domain has cyclomatic complexity 66 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/activitypub/src/views/preferences/components/domain.tsx:88
  • PostPreviewModal has cyclomatic complexity 62 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/admin/src/editor/preview/post-preview-modal.tsx:80
  • getDescription has cyclomatic complexity 61 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ghost/core/core/frontend/meta/description.js:5
  • update has cyclomatic complexity 55 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ghost/core/core/server/services/members/members-api/repositories/member-repository.js:664
  • MemberDetailPage has cyclomatic complexity 52 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/admin/src/members/detail/member-detail.tsx:67
  • (anonymous) has cyclomatic complexity 52 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/activitypub/src/views/notifications/notifications.tsx:414
  • ghost_head has cyclomatic complexity 51 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ghost/core/core/frontend/helpers/ghost_head.js:359
  • fetchQueryStrData has cyclomatic complexity 50 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:492
  • fetchLinkData has cyclomatic complexity 49 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:668
  • TagDetail has cyclomatic complexity 49 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/admin/src/tags/detail/tag-detail.tsx:54
  • getAction has cyclomatic complexity 48 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/admin/src/members/detail/member-event.ts:240
  • ProfilePage has cyclomatic complexity 46 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/activitypub/src/views/profile/components/profile-page.tsx:58
  • (anonymous) has cyclomatic complexity 46 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/shade/src/components/patterns/settings-modal.tsx:130
  • (anonymous) has cyclomatic complexity 45 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/activitypub/src/views/preferences/components/profile.tsx:54
  • toggleCodeBlock has cyclomatic complexity 44 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — koenig/kg-simplemde/src/js/simplemde.js:265
  • getAction has cyclomatic complexity 43 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/ember-admin/app/helpers/parse-member-event.js:194

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.5 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage7.1 / 10Strong✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • ghost/core/core/frontend/services/theme-engine/config/index.js:2 imports './defaults', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ghost/core/core/frontend/services/theme-engine/config/index.js
  • koenig/kg-default-nodes/test/generate-decorator-node.test.ts:2 imports '../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/generate-decorator-node.test.ts
  • koenig/kg-default-nodes/test/nodes/aside.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/aside.test.ts
  • koenig/kg-default-nodes/test/nodes/at-link-search.test.ts:4 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/at-link-search.test.ts
  • koenig/kg-default-nodes/test/nodes/at-link.test.ts:4 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/at-link.test.ts
  • koenig/kg-default-nodes/test/nodes/audio.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/audio.test.ts
  • koenig/kg-default-nodes/test/nodes/bookmark.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/bookmark.test.ts
  • koenig/kg-default-nodes/test/nodes/button.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/button.test.ts
  • koenig/kg-default-nodes/test/nodes/call-to-action.test.ts:5 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/call-to-action.test.ts
  • koenig/kg-default-nodes/test/nodes/callout.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/callout.test.ts
  • koenig/kg-default-nodes/test/nodes/codeblock.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/codeblock.test.ts
  • koenig/kg-default-nodes/test/nodes/email-cta.test.ts:3 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/email-cta.test.ts
  • koenig/kg-default-nodes/test/nodes/email.test.ts:3 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/email.test.ts
  • koenig/kg-default-nodes/test/nodes/embed.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/embed.test.ts
  • koenig/kg-default-nodes/test/nodes/file.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/file.test.ts
  • koenig/kg-default-nodes/test/nodes/gallery.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/gallery.test.ts
  • koenig/kg-default-nodes/test/nodes/header.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/header.test.ts
  • koenig/kg-default-nodes/test/nodes/horizontalrule.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/horizontalrule.test.ts
  • koenig/kg-default-nodes/test/nodes/html.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/html.test.ts
  • koenig/kg-default-nodes/test/nodes/image.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/image.test.ts
  • koenig/kg-default-nodes/test/nodes/markdown.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/markdown.test.ts
  • koenig/kg-default-nodes/test/nodes/paywall.test.ts:3 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/paywall.test.ts
  • koenig/kg-default-nodes/test/nodes/product.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/product.test.ts
  • koenig/kg-default-nodes/test/nodes/signup.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/signup.test.ts
  • koenig/kg-default-nodes/test/nodes/tk.test.ts:2 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/tk.test.ts
  • koenig/kg-default-nodes/test/nodes/toggle.test.ts:4 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/toggle.test.ts
  • koenig/kg-default-nodes/test/nodes/transistor.test.ts:4 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/transistor.test.ts
  • koenig/kg-default-nodes/test/nodes/video.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/video.test.ts
  • koenig/kg-default-nodes/test/nodes/zwnj.test.ts:2 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/nodes/zwnj.test.ts
  • koenig/kg-default-nodes/test/renderers/audio-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/audio-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/bookmark-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/bookmark-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/button-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/button-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/call-to-action-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/call-to-action-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/callout-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/callout-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/codeblock-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/codeblock-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/email-cta-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/email-cta-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/email-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/email-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/embed-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/embed-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/file-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/file-renderer.test.ts
  • koenig/kg-default-nodes/test/renderers/gallery-renderer.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/kg-default-nodes/test/renderers/gallery-renderer.test.ts

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • This repository declares test tooling, and the ✓ above records that declaration — but ghost/core/core/frontend/services/theme-engine/config/index.js and 190 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — ghost/core/core/frontend/services/theme-engine/config/index.js
R7 · Dead Code6.8 / 10Adequate✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 63 file(s) (~14791 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — koenig/kg-default-nodes
  • 7 file(s) (~613 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — koenig/kg-lexical-html-renderer
  • 123 file(s) (~24181 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — koenig/koenig-lexical
  • Unreachable from the 480 application, 477 tooling and 4262 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×31) — REDACTED, apps/ember-admin/app/services/billing.js, apps/ember-admin/app/components/gh-post-settings-menu.js, …
  • no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/ember-admin/app/helpers/publish-options.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/ember-admin/app/utils/publish-options.js
  • no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/ember-admin/app/components/editor/modals/publish-flow/complete-with-email-error.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/ember-admin/app/components/editor/publish-management.js
  • no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/ember-admin/mirage/routes-test.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/ember-admin/mirage/config/members.js
  • no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/ember-admin/app/services/notifications.js
  • no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (apps/ember-admin/app/components/gh-paginated-filter-select.js, apps/ember-admin/app/components/gh-paginated-token-input.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/ember-admin/app/components/gh-paginated-options.js

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×10) — apps/ember-admin/app/models/post.js:2, apps/ember-admin/app/components/modal-post-success.js:3, apps/ember-admin/app/components/editor/modals/publish-flow.js:5, …
  • Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json. — REDACTED:14
  • Declared in apps/ember-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)
  • Every import is type-only — move it to devDependencies. — ghost/core/core/frontend/meta/og-type.ts:1
  • Only test files import it — move it to devDependencies. — apps/admin/src/automations/automations.test.tsx:2

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • apps/activitypub/src/components/feed/feed-item-stats.tsx → apps/activitypub/src/components/modals/new-note-modal.tsx → apps/activitypub/src/components/feed/feed-item.tsx → apps/activitypub/src/components/feed/feed-item-stats.tsx (one verified cycle inside a mutually-dependent group of 4 files) — apps/activitypub/src/components/feed/feed-item-stats.tsx
  • apps/activitypub/src/components/layout/error/error.tsx → apps/activitypub/src/components/layout/layout.tsx → apps/activitypub/src/components/layout/header/index.tsx → apps/activitypub/src/components/layout/header/header.tsx → apps/activitypub/src/hooks/use-active-route.ts → apps/activitypub/src/routes.tsx → apps/activitypub/src/components/layout/error/index.ts → apps/activitypub/src/components/layout/error/error.tsx (one verified cycle inside a mutually-dependent group of 27 files) — apps/activitypub/src/components/layout/error/error.tsx
  • apps/admin/src/analytics/api.ts → apps/admin/src/analytics/routes.tsx → apps/admin/src/analytics/views/stats/overview/index.ts → apps/admin/src/analytics/views/stats/overview/overview.tsx → apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx → apps/admin/src/routes.tsx → apps/admin/src/analytics/api.ts (one verified cycle inside a mutually-dependent group of 60 files) — apps/admin/src/analytics/api.ts
  • apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx → apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx → apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx — apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx
  • apps/admin/src/settings/advanced/integrations/zapier-modal.tsx → apps/admin/src/settings/providers/settings-app-context.ts → apps/admin/src/settings/advanced/integrations/zapier-modal.tsx (one verified cycle inside a mutually-dependent group of 4 files) — apps/admin/src/settings/advanced/integrations/zapier-modal.tsx
  • apps/admin/src/settings/general/user-detail-modal.tsx → apps/admin/src/settings/general/users/profile-tab.tsx → apps/admin/src/settings/general/user-detail-modal.tsx (one verified cycle inside a mutually-dependent group of 3 files) — apps/admin/src/settings/general/user-detail-modal.tsx
  • apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx → apps/admin/src/settings/membership/tiers/tier-detail-preview.tsx → apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx — apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx
  • apps/admin/vite-backend-proxy.ts → apps/admin/vite.config.ts → apps/admin/vite-backend-proxy.ts — apps/admin/vite-backend-proxy.ts
  • apps/comments-ui/src/components/content/comment.tsx → apps/comments-ui/src/components/content/replies.tsx → apps/comments-ui/src/components/content/comment.tsx (one verified cycle inside a mutually-dependent group of 4 files) — apps/comments-ui/src/components/content/comment.tsx
  • apps/shade/src/components/ui/tooltip.tsx → apps/shade/src/providers/shade-provider.tsx → apps/shade/src/components/ui/tooltip.tsx (one verified cycle inside a mutually-dependent group of 3 files) — apps/shade/src/components/ui/tooltip.tsx
  • apps/signup-form/src/app-context.ts → apps/signup-form/src/pages.tsx → apps/signup-form/src/components/pages/form-page.tsx → apps/signup-form/src/app-context.ts (one verified cycle inside a mutually-dependent group of 6 files) — apps/signup-form/src/app-context.ts
  • ghost/core/core/server/api/endpoints/index.js → ghost/core/core/server/api/endpoints/authentication.js → ghost/core/core/server/api/endpoints/index.js (one verified cycle inside a mutually-dependent group of 113 files) — ghost/core/core/server/api/endpoints/index.js
  • ghost/core/core/server/services/permissions/index.js → ghost/core/core/server/models/index.js → ghost/core/core/server/models/author.js → ghost/core/core/server/models/user.js → ghost/core/core/server/services/permissions/index.js (one verified cycle inside a mutually-dependent group of 111 files) — ghost/core/core/server/services/permissions/index.js

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. Deterministic.

  • `http://localhost:2368/ghost/assets/signup-form/signup-form.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 6 such include(s) across the repository's markup. — apps/signup-form/preview.html:22

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health63%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture39%Weak — gated by R11, R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity79%StrongStrongest area.
Readiness46%Weak — gated by R8, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security75%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility42%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 77 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — Production source is present (.mts, .ts, .tsx) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D4 Code Duplication — This repository's production source (.mts, .ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a CS/VB/GO/SCALA/SWIFT/DART class graph, and this repository's production source is .mts, .ts, .tsx, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
  • DM1 Aggregate boundaries — not scored for TypeScript: a class holding another class reads the same whether the inner type is an aggregate or a value object, so this cannot be decided from source without guessing — reported as guidance rather than measured
  • DM2 Strongly-typed ids — not scored for TypeScript: branded ids (`type Id = string & { __brand }`) are an uncommon idiom, so a bare-string id is not on its own evidence of a missing typed id — reported as guidance rather than measured
  • DM3 Integration-event coupling — not scored for TypeScript: a domain type used across packages is indistinguishable in source from a deliberate shared-kernel package, so this is reported as guidance rather than measured
  • DM4 Rich vs anemic model — not scored for TypeScript: telling a rich domain entity from an anemic data holder needs the behaviour a source-only read cannot always attribute (components, DTOs and readonly value objects are all legitimately data-shaped), so this is reported as guidance rather than measured
  • DM5 Encapsulated state — not scored for TypeScript: the language already steers state behind #private/private/readonly, so a mutable public field is rare enough that we report this as guidance rather than measuring it
  • DM6 Domain ↔ infrastructure boundary — this TypeScript/JavaScript repository maps no type to a persistence framework (TypeORM/Prisma/MikroORM/Sequelize/Mongoose), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not scored for TypeScript: deciding whether a repository belongs to an aggregate root needs the aggregate structure, which source alone does not state — reported as guidance rather than measured
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage --coverage.reporter=lcovonly`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 173 finding(s)
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×26
  • Click handler on a non-interactive <div> apps/activitypub/src/components/activities/activity-item.tsx:21 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:734 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:836 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:873 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:981 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:994 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:1077 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/feed/feed-item.tsx:1192 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/global/ap-avatar.tsx:183 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/global/ap-avatar.tsx:203 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/global/profile-preview-hover-card.tsx:156 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/components/layout/layout.tsx:85 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/views/explore/explore.tsx:50 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/views/feed/components/suggested-profiles.tsx:131 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/views/feed/note.tsx:220 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> REDACTED:980 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/views/notifications/notifications.tsx:501 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/activitypub/src/views/preferences/components/edit-profile.tsx:284 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:149 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:219 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:238 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:270 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:293 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/top-posts.tsx:118 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/top-posts.tsx:160 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • + 1 more in this group — see findings.md.
AC1 · Text alternatives · <img> without a text alternative · ×22
  • <img> without a text alternative apps/activitypub/src/components/feed/feed-item.tsx:428 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/components/feed/feed-item.tsx:437 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/components/feed/feed-item.tsx:463 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/components/global/ap-avatar.tsx:184 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/components/layout/onboarding/step-1.tsx:70 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/components/layout/onboarding/step-2.tsx:80 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/views/preferences/components/edit-profile.tsx:255 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/views/preferences/components/edit-profile.tsx:290 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/activitypub/src/views/preferences/components/profile.tsx:600 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/admin/src/posts/analytics/newsletter/components/feedback.tsx:146 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/admin/src/settings/advanced/labs.tsx:61 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/admin/src/settings/growth/explore.tsx:134 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/admin/src/settings/growth/explore.tsx:185 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/admin/src/settings/growth/network.tsx:112 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative apps/admin/src/settings/site/design-setting.tsx:33 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:3 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:23 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:121 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:121 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:121 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:121 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative koenig/kg-default-nodes/src/nodes/file/file-renderer.ts:65 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · <label> that labels no control · ×15
  • <label> that labels no control apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:196 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx:618 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:6 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:10 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:83 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:49 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:51 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:244 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:338 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:392 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:418 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:655 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:720 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control REDACTED:786 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/portal/src/components/pages/account-plan-page.jsx:229 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D10 · Test Quality · No assertions (empty test) · ×14
  • No assertions (empty test): holds the input shut until the generator answers apps/admin/src/editor/editor-settings-url.acceptance.test.tsx:207 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): rechecks limit readiness when the mounted flow moves to another post apps/admin/src/editor/publish/publish-flow.component.test.tsx:562 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): names a since-archived newsletter a scheduled post was already sent to apps/admin/src/editor/publish/publish-flow.component.test.tsx:1149 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): describes the audience for a scheduled email that has not been sent yet apps/admin/src/editor/publish/publish-flow.component.test.tsx:1182 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): does not claim a scheduled email-only post will be published apps/admin/src/editor/publish/publish-flow.component.test.tsx:1207 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): does not count the current default newsletter for a missing persisted newsletter apps/admin/src/editor/publish/publish-flow.component.test.tsx:1236 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): does not replace a missing persisted segment with the current site default apps/admin/src/editor/publish/publish-flow.component.test.tsx:1265 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): does not claim that a failed published email was sent apps/admin/src/editor/publish/publish-flow.component.test.tsx:1293 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): Can import the whole dataset without error ghost/core/test/unit/server/data/seeders/data-generator.test.js:101 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): destroys streaming sources and cleans up theme files when the client disconnects ghost/core/test/unit/server/services/exports/site-exporter.test.ts:208 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): removes a theme zip that finishes staging after the client disconnects ghost/core/test/unit/server/services/exports/site-exporter.test.ts:240 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): clearHandlers lets a rebooted process register the same job types again ghost/core/test/unit/server/services/jobs-service/jobs-service.test.ts:372 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): clearHandlers resets queue declarations so a reboot can re-declare them ghost/core/test/unit/server/services/jobs-service/jobs-service.test.ts:381 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): re-init clears handlers so a reboot can register the same job types again ghost/core/test/unit/server/services/jobs-service/index.test.js:76 — Test method has an empty body — it asserts nothing and exercises no code.
D29 · Static Analysis (SAST) · REDACTED · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×8
  • Import cycle (2 files) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx — apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx → apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx → apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx
  • Import cycle (2 files) apps/admin/src/settings/advanced/integrations/zapier-modal.tsx — apps/admin/src/settings/advanced/integrations/zapier-modal.tsx → apps/admin/src/settings/providers/settings-app-context.ts → apps/admin/src/settings/advanced/integrations/zapier-modal.tsx (one verified cycle inside a mutually-dependent group of 4 files)
  • Import cycle (2 files) apps/admin/src/settings/general/user-detail-modal.tsx — apps/admin/src/settings/general/user-detail-modal.tsx → apps/admin/src/settings/general/users/profile-tab.tsx → apps/admin/src/settings/general/user-detail-modal.tsx (one verified cycle inside a mutually-dependent group of 3 files)
  • Import cycle (2 files) apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx — apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx → apps/admin/src/settings/membership/tiers/tier-detail-preview.tsx → apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx
  • Import cycle (2 files) apps/admin/vite-backend-proxy.ts — apps/admin/vite-backend-proxy.ts → apps/admin/vite.config.ts → apps/admin/vite-backend-proxy.ts
  • Import cycle (2 files) apps/comments-ui/src/components/content/comment.tsx — apps/comments-ui/src/components/content/comment.tsx → apps/comments-ui/src/components/content/replies.tsx → apps/comments-ui/src/components/content/comment.tsx (one verified cycle inside a mutually-dependent group of 4 files)
  • Import cycle (2 files) apps/shade/src/components/ui/tooltip.tsx — apps/shade/src/components/ui/tooltip.tsx → apps/shade/src/providers/shade-provider.tsx → apps/shade/src/components/ui/tooltip.tsx (one verified cycle inside a mutually-dependent group of 3 files)
  • Import cycle (2 files) ghost/core/core/server/api/endpoints/index.js — ghost/core/core/server/api/endpoints/index.js → ghost/core/core/server/api/endpoints/authentication.js → ghost/core/core/server/api/endpoints/index.js (one verified cycle inside a mutually-dependent group of 113 files)
AC3 · Page structure · Viewport restricts zoom · ×7
  • Viewport restricts zoom apps/admin/index.html:8 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom apps/comments-ui/src/components/frame.tsx:28 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom apps/ember-admin/app/index.html:10 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom REDACTED:329 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom apps/signup-form/src/components/frame.tsx:113 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom apps/sodo-search/src/components/popup-modal.jsx:641 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom apps/sodo-search/src/components/popup-modal.jsx:648 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×6
  • Click handler on a non-interactive <span> apps/activitypub/src/components/feed/feed-item.tsx:851 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <span> apps/activitypub/src/components/feed/feed-item.tsx:1205 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <span> apps/activitypub/src/components/feed/feed-item.tsx:1224 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <span> apps/activitypub/src/components/global/profile-preview-hover-card.tsx:174 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <span> apps/activitypub/src/components/global/profile-preview-hover-card.tsx:180 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <span> apps/activitypub/src/views/notifications/notifications.tsx:134 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D31 · IaC & Container Security · REDACTED IaC · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×4
  • <input> without a programmatic label apps/admin/src/members/label-picker/label-picker.tsx:349 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/comments-ui/src/components/popups/add-details-popup.tsx:203 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label REDACTED:35 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/portal/src/components/common/date-picker.jsx:436 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · <html> without a lang · ×4
  • <html> without a lang .github/embed-renderer/404.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang REDACTED:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang REDACTED:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang REDACTED:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels · Link with no accessible name · ×3
  • Link with no accessible name apps/activitypub/src/views/preferences/components/profile.tsx:463 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name apps/activitypub/src/views/preferences/components/profile.tsx:476 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name apps/activitypub/src/views/preferences/components/profile.tsx:515 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC4 · Keyboard semantics · Click handler on a non-interactive <img> · ×3
  • Click handler on a non-interactive <img> apps/activitypub/src/components/feed/feed-item.tsx:136 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <img> apps/activitypub/src/components/feed/feed-item.tsx:163 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <img> apps/activitypub/src/components/feed/feed-item.tsx:207 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC1 · Text alternatives · <svg role="img"> without an accessible name · ×2
  • <svg role="img"> without an accessible name apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:223 — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
  • <svg role="img"> without an accessible name apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:281 — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×2
  • Custom control with no accessible name on <div> apps/activitypub/src/components/feed/feed-item.tsx:734 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> apps/activitypub/src/components/layout/layout.tsx:85 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text apps/comments-ui/src/components/content/buttons/more-button.tsx:24 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text apps/comments-ui/src/components/popups/close-button.tsx:9 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×2
  • Hover-only interaction on <div> apps/activitypub/src/components/feed/table-of-contents.tsx:193 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> apps/activitypub/src/components/layout/onboarding/step-3.tsx:389 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
AC5 · ARIA correctness · role="combobox" missing required aria-expanded · ×2
  • role="combobox" missing required aria-expanded apps/admin/src/members/label-picker/label-picker.tsx:337 — The combobox role requires aria-expanded to convey its state. Add it.
  • role="combobox" missing required aria-expanded apps/admin/src/settings/advanced/history-modal.tsx:279 — The combobox role requires aria-expanded to convey its state. Add it.
D10 · Test Quality · Assertions commented out · ×2
  • Assertions commented out: can upload an image koenig/koenig-lexical/test/e2e/cards/markdown-card.test.ts:207 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
  • Assertions commented out: colour picker renders all colours koenig/koenig-lexical/test/e2e/cards/callout-card.test.ts:128 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D30 · Dependency Vulnerabilities · REDACTED CVE · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×2
  • Boundary-crossing change coupling: feature.js ↔ labs.js apps/ember-admin/app/services/feature.js — `apps/ember-admin/app/services/feature.js` (context ember-admin) and `ghost/core/core/shared/labs.js` (context ghost) sit in DIFFERENT parts of the tree yet change together 62% of the time (40 of the 65 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 40 shared commits counted here, the most recent 3 are `c2a3ad55` Added a globalSearchReact flag for the React Cmd-K search migration (…; `791d50c1` Removed the tagDetailsReact labs flag (#30914); `19c48912` Added an editorReact flag gating /editor between Ember and a React pl… — run `git show` on any of them.
  • Boundary-crossing change coupling: top-content.tsx ↔ content-stats-service.js apps/admin/src/analytics/views/stats/web/components/top-content.tsx — `apps/admin/src/analytics/views/stats/web/components/top-content.tsx` (context admin) and `ghost/core/core/server/services/stats/content-stats-service.js` (context ghost) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `cc4eee9c` Added filter dropdown for UTM fields (#25422) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/top-content.tsx` and `ghost/core/core/server/services/stats/ContentStatsService.js`); `66adb62a` Enhanced URL existence validation in stats services (#24046) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/TopContent.tsx` and `ghost/core/core/server/services/stats/ContentStatsService.js`); `bc6de423` Fixed page filter for Stats > Top content component (#23745) (at that commit the files were still `apps/stats/src/views/Stats/Web.tsx` and `ghost/core/core/server/services/stats/ContentStatsService.js`) — run `git show` on any of them.
R9 · Circular Imports · Import cycle (3 files) · ×2
  • Import cycle (3 files) apps/activitypub/src/components/feed/feed-item-stats.tsx — apps/activitypub/src/components/feed/feed-item-stats.tsx → apps/activitypub/src/components/modals/new-note-modal.tsx → apps/activitypub/src/components/feed/feed-item.tsx → apps/activitypub/src/components/feed/feed-item-stats.tsx (one verified cycle inside a mutually-dependent group of 4 files)
  • Import cycle (3 files) apps/signup-form/src/app-context.ts — apps/signup-form/src/app-context.ts → apps/signup-form/src/pages.tsx → apps/signup-form/src/components/pages/form-page.tsx → apps/signup-form/src/app-context.ts (one verified cycle inside a mutually-dependent group of 6 files)
AC2 · Forms & labels · <textarea> without a programmatic label · ×1
  • <textarea> without a programmatic label apps/activitypub/src/components/modals/new-note-modal.tsx:394 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label apps/ember-admin/app/components/gh-input-with-select/index.hbs:2 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics · Clickable role="button" that no keyboard user can reach · ×1
  • Clickable role="button" that no keyboard user can reach apps/activitypub/src/views/notifications/components/notification-item.tsx:32 — This <div> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it.
AC4 · Keyboard semantics · Focusable <div> isn't keyboard-operable · ×1
  • Focusable <div> isn't keyboard-operable apps/activitypub/src/views/preferences/components/settings.tsx:179 — This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
D14 · License Compliance · Banned license · ×1
  • Banned license: ua-parser-js — `ua-parser-js` 1.0.41 is published on registry.npmjs.org under `AGPL-3.0-or-later`, which this policy bans, and it is a PRODUCTION dependency this repository's committed lockfile resolves — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
D31 · IaC & Container Security · Critical IaC · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@ember-data/model' · ×1
  • Unlisted import '@ember-data/model' apps/ember-admin/app/models/post.js:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@ember/string' · ×1
  • Unlisted import '@ember/string' apps/ember-admin/app/components/modal-post-success.js:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@glimmer/tracking' · ×1
  • Unlisted import '@glimmer/tracking' apps/ember-admin/app/components/editor/modals/publish-flow.js:5 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'ember-basic-dropdown' · ×1
  • Unlisted import 'ember-basic-dropdown' apps/ember-admin/tests/integration/components/gh-basic-dropdown-test.js:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'ember-inflector' · ×1
  • Unlisted import 'ember-inflector' apps/ember-admin/app/helpers/humanize-recipient-filter.js:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'ember-raf-scheduler' · ×1
  • Unlisted import 'ember-raf-scheduler' apps/ember-admin/tests/test-helper.js:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'jquery' · ×1
  • Unlisted import 'jquery' apps/ember-admin/tests/integration/components/gh-image-uploader-test.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'mocha' · ×1
  • Unlisted import 'mocha' apps/ember-admin/tests/acceptance/authentication-test.js:4 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'rsvp' · ×1
  • Unlisted import 'rsvp' apps/ember-admin/app/routes/posts.js:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'sinon' · ×1
  • Unlisted import 'sinon' apps/ember-admin/tests/acceptance/content-test.js:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (7 files) · ×1
  • Import cycle (7 files) apps/activitypub/src/components/layout/error/error.tsx — apps/activitypub/src/components/layout/error/error.tsx → apps/activitypub/src/components/layout/layout.tsx → apps/activitypub/src/components/layout/header/index.tsx → apps/activitypub/src/components/layout/header/header.tsx → apps/activitypub/src/hooks/use-active-route.ts → apps/activitypub/src/routes.tsx → apps/activitypub/src/components/layout/error/index.ts → apps/activitypub/src/components/layout/error/error.tsx (one verified cycle inside a mutually-dependent group of 27 files)
R9 · Circular Imports · Import cycle (6 files) · ×1
  • Import cycle (6 files) apps/admin/src/analytics/api.ts — apps/admin/src/analytics/api.ts → apps/admin/src/analytics/routes.tsx → apps/admin/src/analytics/views/stats/overview/index.ts → apps/admin/src/analytics/views/stats/overview/overview.tsx → apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx → apps/admin/src/routes.tsx → apps/admin/src/analytics/api.ts (one verified cycle inside a mutually-dependent group of 60 files)
R9 · Circular Imports · Import cycle (4 files) · ×1
  • Import cycle (4 files) ghost/core/core/server/services/permissions/index.js — ghost/core/core/server/services/permissions/index.js → ghost/core/core/server/models/index.js → ghost/core/core/server/models/author.js → ghost/core/core/server/models/user.js → ghost/core/core/server/services/permissions/index.js (one verified cycle inside a mutually-dependent group of 111 files)
Serious — 4243 finding(s)
D10 · Test Quality · No assertions · ×1710
  • No assertions: hands the analytics action back to the Admin host apps/activitypub/test/acceptance/error.test.ts:9 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: redirects a contributor away from settings apps/admin/src/route-access.acceptance.test.tsx:34 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: redirects an author away from another staff member's profile settings apps/admin/src/route-access.acceptance.test.tsx:49 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: redirects a contributor away from tags apps/admin/src/route-access.acceptance.test.tsx:55 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: redirects an editor away from members apps/admin/src/route-access.acceptance.test.tsx:61 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: redirects members to billing during a force upgrade apps/admin/src/route-access.acceptance.test.tsx:83 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: applies labs flags alongside browseConfig and browseSettings overrides apps/admin/src/render-admin-app-labs.acceptance.test.tsx:112 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: sends admins to Analytics apps/admin/src/home.acceptance.test.tsx:45 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: sends contributors to Posts apps/admin/src/home.acceptance.test.tsx:53 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: sends other staff roles to Site apps/admin/src/home.acceptance.test.tsx:61 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: redirects to Analytics apps/admin/src/home.acceptance.test.tsx:100 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders zero KPIs when growth history is empty apps/admin/src/analytics/analytics.acceptance.test.tsx:127 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders the latest and top posts with zeroed stats when nothing is recorded apps/admin/src/analytics/analytics.acceptance.test.tsx:177 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: navigates to the web traffic view from the visitors KPI apps/admin/src/analytics/analytics.acceptance.test.tsx:214 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: navigates to the growth view from the members KPI apps/admin/src/analytics/analytics.acceptance.test.tsx:225 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: stays on the Web route while settings load, then renders seeded analytics apps/admin/src/analytics/analytics.acceptance.test.tsx:239 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders zeroed KPIs and empty cards when there are no visits apps/admin/src/analytics/analytics.acceptance.test.tsx:283 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: keeps the empty state across the top content tabs apps/admin/src/analytics/analytics.acceptance.test.tsx:295 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders the seeded member growth and top content apps/admin/src/analytics/analytics.acceptance.test.tsx:309 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shows No conversions across the top content tabs when nothing converted apps/admin/src/analytics/analytics.acceptance.test.tsx:335 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders the seeded subscriber KPIs and top newsletters apps/admin/src/analytics/analytics.acceptance.test.tsx:369 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shows the empty state on every newsletter card when none were sent apps/admin/src/analytics/analytics.acceptance.test.tsx:410 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders the automations page apps/admin/src/automations/automations.acceptance.test.tsx:10 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: hides run analytics when the backend does not return stats apps/admin/src/automations/automations.acceptance.test.tsx:57 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: navigates within threads and shows the replied-to context apps/admin/src/comments/comments.acceptance.test.tsx:45 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 1685 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×809
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 784 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×337
  • Hotspot: apps/admin/src/editor/session/editor-session.ts apps/admin/src/editor/session/editor-session.ts:216 — apps/admin/src/editor/session/editor-session.ts changed 26 times in last 90 days, max cyclomatic complexity 92 in editor-session.createEditorSession at line 216. 5 of those changes were fix/bug commits, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/editor/session/editor-session.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:61 — apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx changed 25 times in last 90 days, max cyclomatic complexity 79 in tier-detail-modal.TierDetailModalContent at line 61. 1 of those changes was a fix/bug commit, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/general/user-detail-modal.tsx apps/admin/src/settings/general/user-detail-modal.tsx:121 — apps/admin/src/settings/general/user-detail-modal.tsx changed 26 times in last 90 days, max cyclomatic complexity 69 in user-detail-modal.UserDetailModalContent at line 121. 1 of those changes was a fix/bug commit, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/general/user-detail-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:166 — apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx changed 31 times in last 90 days, max cyclomatic complexity 53 in newsletter-detail-modal.Sidebar at line 166. 1 of those changes was a fix/bug commit, and the other 30 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298 — apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx changed 14 times in last 90 days, max cyclomatic complexity 113 in theme-code-editor-modal.ThemeCodeEditorModal at line 298. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/growth/offers/add-offer-modal.tsx apps/admin/src/settings/growth/offers/add-offer-modal.tsx:454 — apps/admin/src/settings/growth/offers/add-offer-modal.tsx changed 18 times in last 90 days, max cyclomatic complexity 72 in add-offer-modal.AddOfferModal at line 454. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/growth/offers/add-offer-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/members/detail/member-detail.tsx apps/admin/src/members/detail/member-detail.tsx:67 — apps/admin/src/members/detail/member-detail.tsx changed 17 times in last 90 days, max cyclomatic complexity 75 in member-detail.MemberDetailPage at line 67. 2 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/members/detail/member-detail.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:503 — apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx changed 19 times in last 90 days, max cyclomatic complexity 66 in edit-retention-offer-modal.EditRetentionOfferModal at line 503. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/posts/analytics/newsletter/newsletter.tsx apps/admin/src/posts/analytics/newsletter/newsletter.tsx:102 — apps/admin/src/posts/analytics/newsletter/newsletter.tsx changed 16 times in last 90 days, max cyclomatic complexity 66 in newsletter.Newsletter at line 102. 2 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/posts/analytics/newsletter/newsletter.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ghost/core/core/server/services/members/members-api/repositories/member-repository.js ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223 — ghost/core/core/server/services/members/members-api/repositories/member-repository.js changed 8 times in last 90 days, max cyclomatic complexity 124 in linkSubscription at line 1223. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- ghost/core/core/server/services/members/members-api/repositories/member-repository.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/portal/src/utils/api.js apps/portal/src/utils/api.js:4 — apps/portal/src/utils/api.js changed 9 times in last 90 days, max cyclomatic complexity 107 in api.setupGhostApi at line 4. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/portal/src/utils/api.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx:43 — apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx changed 24 times in last 90 days, max cyclomatic complexity 40 in custom-field-modal.CustomFieldModal at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/layout/sidebar.tsx apps/admin/src/settings/layout/sidebar.tsx:115 — apps/admin/src/settings/layout/sidebar.tsx changed 22 times in last 90 days, max cyclomatic complexity 43 in sidebar.Sidebar at line 115. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/layout/sidebar.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/shade/src/components/patterns/filters.tsx apps/shade/src/components/patterns/filters.tsx:2947 — apps/shade/src/components/patterns/filters.tsx changed 11 times in last 90 days, max cyclomatic complexity 84 in filters.Filters at line 2947. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/shade/src/components/patterns/filters.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/posts/analytics/components/post-analytics-header.tsx apps/admin/src/posts/analytics/components/post-analytics-header.tsx:66 — apps/admin/src/posts/analytics/components/post-analytics-header.tsx changed 19 times in last 90 days, max cyclomatic complexity 43 in post-analytics-header.PostAnalyticsHeader at line 66. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/posts/analytics/components/post-analytics-header.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/tags/detail/tag-detail.tsx apps/admin/src/tags/detail/tag-detail.tsx:54 — apps/admin/src/tags/detail/tag-detail.tsx changed 9 times in last 90 days, max cyclomatic complexity 87 in tag-detail.TagDetail at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/tags/detail/tag-detail.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/editor/engine/save-engine.ts apps/admin/src/editor/engine/save-engine.ts:364 — apps/admin/src/editor/engine/save-engine.ts changed 6 times in last 90 days, max cyclomatic complexity 130 in save-engine.createSaveEngine at line 364. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/editor/engine/save-engine.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/editor/preview/post-preview-modal.tsx apps/admin/src/editor/preview/post-preview-modal.tsx:80 — apps/admin/src/editor/preview/post-preview-modal.tsx changed 10 times in last 90 days, max cyclomatic complexity 77 in post-preview-modal.PostPreviewModal at line 80. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/editor/preview/post-preview-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/settings/site/design-and-branding/global-settings.tsx apps/admin/src/settings/site/design-and-branding/global-settings.tsx:101 — apps/admin/src/settings/site/design-and-branding/global-settings.tsx changed 11 times in last 90 days, max cyclomatic complexity 69 in global-settings.GlobalSettings at line 101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/settings/site/design-and-branding/global-settings.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/posts/analytics/overview/overview.tsx apps/admin/src/posts/analytics/overview/overview.tsx:51 — apps/admin/src/posts/analytics/overview/overview.tsx changed 15 times in last 90 days, max cyclomatic complexity 50 in overview.Overview at line 51. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/posts/analytics/overview/overview.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/editor/session/use-editor-session.ts apps/admin/src/editor/session/use-editor-session.ts:164 — apps/admin/src/editor/session/use-editor-session.ts changed 23 times in last 90 days, max cyclomatic complexity 32 in use-editor-session.useEditorSession at line 164. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/editor/session/use-editor-session.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:492 — REDACTED changed 14 times in last 90 days, max cyclomatic complexity 50 in App.fetchQueryStrData at line 492. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:56 — REDACTED changed 7 times in last 90 days, max cyclomatic complexity 98 in newsletter-preview-content.NewsletterPreviewContent at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:68 — apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx changed 12 times in last 90 days, max cyclomatic complexity 55 in import-members-modal.ImportMembersModal at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ghost/core/core/server/services/members/import-export/import/importer.ts ghost/core/core/server/services/members/import-export/import/importer.ts:421 — ghost/core/core/server/services/members/import-export/import/importer.ts changed 16 times in last 90 days, max cyclomatic complexity 40 in MembersCSVImporter.writeRows at line 421. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-27..2026-09-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-27 12:14:05 +02:00' --until='2026-09-25 12:14:05 +02:00' --full-history --no-merges -- ghost/core/core/server/services/members/import-export/import/importer.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 312 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×165
  • FunctionTooLong: dots-pattern.DotsPatternn apps/activitypub/src/views/preferences/components/dots-pattern.tsx:6 — FunctionTooLong — DotsPatternn runs 3364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3264 over it, 33.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: api.setupGhostApi apps/portal/src/utils/api.js:4 — FunctionTooLong — setupGhostApi runs 750 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 650 over it, 7.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: reader.Reader REDACTED:535 — FunctionTooLong — Reader runs 567 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 467 over it, 5.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: theme-code-editor-modal.ThemeCodeEditorModal apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298 — FunctionTooLong — ThemeCodeEditorModal runs 556 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 456 over it, 5.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: domain.Domain apps/activitypub/src/views/preferences/components/domain.tsx:88 — FunctionTooLong — Domain runs 461 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 361 over it, 4.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: editor-session.createEditorSession apps/admin/src/editor/session/editor-session.ts:216 — FunctionTooLong — createEditorSession runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: newsletter.Newsletter apps/admin/src/posts/analytics/newsletter/newsletter.tsx:102 — FunctionTooLong — Newsletter runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sidebar.Sidebar apps/admin/src/settings/layout/sidebar.tsx:115 — FunctionTooLong — Sidebar runs 408 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 308 over it, 4.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gift-page.GiftPage apps/portal/src/components/pages/gift-page.tsx:84 — FunctionTooLong — GiftPage runs 387 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 287 over it, 3.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: editor.AutomationEditorContent apps/admin/src/automations/editor.tsx:67 — FunctionTooLong — AutomationEditorContent runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: products-section.ProductsSectionStyles apps/portal/src/components/common/products-section.jsx:28 — FunctionTooLong — ProductsSectionStyles runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: tag-detail.TagDetail apps/admin/src/tags/detail/tag-detail.tsx:54 — FunctionTooLong — TagDetail runs 356 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 256 over it, 3.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: stats-filter.StatsFilter apps/admin/src/shared/analytics/stats-filter.tsx:338 — FunctionTooLong — StatsFilter runs 328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 228 over it, 3.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: access.Access apps/admin/src/settings/membership/access.tsx:135 — FunctionTooLong — Access runs 326 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 226 over it, 3.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: post-preview-modal.PostPreviewModal apps/admin/src/editor/preview/post-preview-modal.tsx:80 — FunctionTooLong — PostPreviewModal runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: use-publish-flow.usePublishFlow apps/admin/src/editor/publish/use-publish-flow.ts:98 — FunctionTooLong — usePublishFlow runs 315 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 215 over it, 3.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: profile.Profile apps/activitypub/src/views/preferences/components/profile.tsx:242 — FunctionTooLong — Profile runs 313 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: note.Note apps/activitypub/src/views/feed/note.tsx:25 — FunctionTooLong — Note runs 310 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 210 over it, 3.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: api.setupGhostApi apps/comments-ui/src/utils/api.ts:3 — FunctionTooLong — setupGhostApi runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: seo-meta.SEOMeta apps/admin/src/settings/general/seo-meta.tsx:90 — FunctionTooLong — SEOMeta runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: posts-list-screen.PostsListScreen apps/admin/src/posts/list/posts-list-screen.tsx:61 — FunctionTooLong — PostsListScreen runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: post-analytics-header.PostAnalyticsHeader apps/admin/src/posts/analytics/components/post-analytics-header.tsx:66 — FunctionTooLong — PostAnalyticsHeader runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: add-offer-modal.AddOfferModal apps/admin/src/settings/growth/offers/add-offer-modal.tsx:454 — FunctionTooLong — AddOfferModal runs 279 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 179 over it, 2.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: member-activity.ActivityPage apps/admin/src/members/activity/member-activity.tsx:48 — FunctionTooLong — ActivityPage runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: notifications.Notifications apps/activitypub/src/views/notifications/notifications.tsx:306 — FunctionTooLong — Notifications runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 140 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×43
  • FileTooLong: components/dots-pattern.tsx apps/activitypub/src/views/preferences/components/dots-pattern.tsx — FileTooLong — 3368 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: DotsPatternn (6-3371). The bar is 500 significant lines; this is 2868 over it, 6.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: patterns/filters.tsx apps/shade/src/components/patterns/filters.tsx — FileTooLong — 2616 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2116 over it, 5.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: schema/schema.js ghost/core/core/server/data/schema/schema.js — FileTooLong — 2114 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 614 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/use-activity-pub-queries.ts apps/activitypub/src/hooks/use-activity-pub-queries.ts — FileTooLong — 1872 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1372 over it, 3.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: repositories/member-repository.js ghost/core/core/server/services/members/members-api/repositories/member-repository.js — FileTooLong — 1538 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 97% of them inside a single declaration: MEMBER_STATUSES (58-2732). The bar is 1500 significant lines; this is 38 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: automations/database-automations-repository.ts ghost/core/core/server/services/automations/database-automations-repository.ts — FileTooLong — 1178 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 678 over it, 2.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: feed/feed-item.tsx apps/activitypub/src/components/feed/feed-item.tsx — FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: FeedItem (506-1334). The bar is 500 significant lines; this is 582 over it, 2.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: gifts/gift-service.ts ghost/core/core/server/services/gifts/gift-service.ts — FileTooLong — 1056 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: GiftService (324-1577). The bar is 500 significant lines; this is 556 over it, 2.11× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1049 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: App (85-1511). The bar is 500 significant lines; this is 549 over it, 2.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 461 over it, 1.92× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: stats/posts-stats-service.js ghost/core/core/server/services/stats/posts-stats-service.js — FileTooLong — 943 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: PostsStatsService (80-1665). The bar is 500 significant lines; this is 443 over it, 1.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: newsletters/newsletter-detail-modal.tsx apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx — FileTooLong — 924 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: Sidebar (159-999). The bar is 500 significant lines; this is 424 over it, 1.85× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: common/products-section.jsx apps/portal/src/components/common/products-section.jsx — FileTooLong — 917 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 417 over it, 1.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 910 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: LexicalEditorController (149-1632). The bar is 500 significant lines; this is 410 over it, 1.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: email-service/email-renderer.js ghost/core/core/server/services/email-service/email-renderer.js — FileTooLong — 851 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 351 over it, 1.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/actions.js apps/portal/src/actions.js — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 326 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: repositories/event-repository.js ghost/core/core/server/services/members/members-api/repositories/event-repository.js — FileTooLong — 813 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 313 over it, 1.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: controllers/router-controller.js ghost/core/core/server/services/members/members-api/controllers/router-controller.js — FileTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 279 over it, 1.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/actions.ts apps/comments-ui/src/actions.ts — FileTooLong — 776 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 276 over it, 1.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: utils/api.js apps/portal/src/utils/api.js — FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: setupGhostApi (4-1104). The bar is 500 significant lines; this is 253 over it, 1.51× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: theme/theme-code-editor-modal.tsx apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx — FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: ThemeCodeEditorModal (298-1129). The bar is 500 significant lines; this is 249 over it, 1.50× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utils/helpers.js apps/portal/src/utils/helpers.js — FileTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 197 over it, 1.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: offers/edit-retention-offer-modal.tsx apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx — FileTooLong — 679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 179 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: offers/add-offer-modal.tsx apps/admin/src/settings/growth/offers/add-offer-modal.tsx — FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 174 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/signup-page.jsx apps/portal/src/components/pages/signup-page.jsx — FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 164 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 18 more in this group — see findings.md.
R4 · Test Coverage · This test file cannot be loaded · ×40
  • This test file cannot be loaded ghost/core/core/frontend/services/theme-engine/config/index.js — ghost/core/core/frontend/services/theme-engine/config/index.js:2 imports './defaults', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/generate-decorator-node.test.ts — koenig/kg-default-nodes/test/generate-decorator-node.test.ts:2 imports '../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/aside.test.ts — koenig/kg-default-nodes/test/nodes/aside.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/at-link-search.test.ts — koenig/kg-default-nodes/test/nodes/at-link-search.test.ts:4 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/at-link.test.ts — koenig/kg-default-nodes/test/nodes/at-link.test.ts:4 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/audio.test.ts — koenig/kg-default-nodes/test/nodes/audio.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/bookmark.test.ts — koenig/kg-default-nodes/test/nodes/bookmark.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/button.test.ts — koenig/kg-default-nodes/test/nodes/button.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/call-to-action.test.ts — koenig/kg-default-nodes/test/nodes/call-to-action.test.ts:5 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/callout.test.ts — koenig/kg-default-nodes/test/nodes/callout.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/codeblock.test.ts — koenig/kg-default-nodes/test/nodes/codeblock.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/email-cta.test.ts — koenig/kg-default-nodes/test/nodes/email-cta.test.ts:3 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/email.test.ts — koenig/kg-default-nodes/test/nodes/email.test.ts:3 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/embed.test.ts — koenig/kg-default-nodes/test/nodes/embed.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/file.test.ts — koenig/kg-default-nodes/test/nodes/file.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/gallery.test.ts — koenig/kg-default-nodes/test/nodes/gallery.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/header.test.ts — koenig/kg-default-nodes/test/nodes/header.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/horizontalrule.test.ts — koenig/kg-default-nodes/test/nodes/horizontalrule.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/html.test.ts — koenig/kg-default-nodes/test/nodes/html.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/image.test.ts — koenig/kg-default-nodes/test/nodes/image.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/markdown.test.ts — koenig/kg-default-nodes/test/nodes/markdown.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/paywall.test.ts — koenig/kg-default-nodes/test/nodes/paywall.test.ts:3 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/product.test.ts — koenig/kg-default-nodes/test/nodes/product.test.ts:1 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/signup.test.ts — koenig/kg-default-nodes/test/nodes/signup.test.ts:2 imports '../test-utils/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded koenig/kg-default-nodes/test/nodes/tk.test.ts — koenig/kg-default-nodes/test/nodes/tk.test.ts:2 imports '../../src/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • + 15 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×32
  • TodoComment apps/activitypub/src/api/activitypub.ts:331 — // TODO: Ping sentry? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/activitypub/src/views/feed/components/suggested-profiles.tsx:47 — // TODO: Implement dismiss functionality — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/activitypub/test/acceptance/inbox.test.ts:72 — // TODO: Add metadata to the post fixture — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin-x-framework/src/api/members.ts:114 — // TODO: The server returns geolocation as a JSON-encoded string (not a parsed object). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/vite.shared.ts:32 — // TODO: Remove this when @tryghost/nql is updated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/analytics/hooks/use-latest-post-stats.ts:105 — // TODO: Add click_rate to PostStats interface if needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/comments/legacy-comment-filter-query.ts:3 — // TODO: Remove this file after the comment filters migration has safely rolled out. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/comments/components/comments-list.tsx:32 — // TODO: Remove forwardRef once we have upgraded to React 19 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/tags/components/tags-list.tsx:27 — // TODO: Remove forwardRef once we have upgraded to React 19 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/comments/components/comment-thread-list.tsx:52 — // TODO: remove count.replies fallback once backend is fully rolled out — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/members/detail/member-newsletters-field.tsx:40 — // TODO: pagination — `useBrowseNewsletters` is an infinite query but this field — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/admin/src/settings/hooks/use-pintura-editor.ts:213 — // TODO: log error message on Sentry — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/comments-ui/src/components/popup-box.tsx:6 — // TODO: figure out what this type should be? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/comments-ui/src/utils/options.ts:23 — // TODO: replace with dynamic data from script — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment apps/comments-ui/src/utils/hooks.ts:105 — // TODO: This does not currently handle the case where the element is outOfViewport for both top&bottom or left&right — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment e2e/helpers/pages/public/public-page.ts:117 — // TODO: Ideally we should find a way to get rid of this. This is currently needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment e2e/tests/post-factory.test.ts:50 — // TODO: Replace this with a 404 page object — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment e2e/tests/public/stripe-offer-checkout.test.ts:12 — // TODO: REMOVE TEST — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment e2e/tests/public/stripe-donation-checkout.test.ts:12 — // TODO: REMOVE TEST — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ghost/core/core/server/adapters/scheduling/scheduling-default.ts:158 — // TODO: fix this typing once @tryghost/request has types — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ghost/core/core/server/adapters/scheduling/error-capture.ts:10 — // TODO: replace with dependency injection once the sentry module is TS — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ghost/core/core/server/data/schema/validator.ts:103 — // TODO: check if mandatory values should be enforced — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ghost/core/core/server/services/adapter-manager/adapter-paths.ts:22 — // TODO: potentially deprecate/remove as part of Ghost 7.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ghost/core/core/server/services/email-analytics/event-processing-result.ts:51 — // TODO: come up with a cleaner way to merge these without churning through Array and Set — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ghost/core/core/server/services/slack-ping/slack-ping-service.ts:272 — // TODO: refactor post.published events to never fire on importing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 7 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×27
  • Boundary violation [package:third-party-deep-import] apps/admin/vite.shared.ts:33 — apps/admin/vite.shared.ts:33 imports mingo/dist/mingo.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/ember-admin/app/routes/posts.js:2 — apps/ember-admin/app/routes/posts.js:2 imports ember-infinity/lib/infinity-model, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/ember-admin/ember-cli-build.js:7 — apps/ember-admin/ember-cli-build.js:7 imports ember-cli/lib/broccoli/ember-app, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] ghost/core/core/server/data/db/better-sqlite3-patches.js:199 — ghost/core/core/server/data/db/better-sqlite3-patches.js:199 imports knex/lib/dialects/better-sqlite3/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] ghost/core/core/server/data/importer/importers/data/data-importer.js:18 — ghost/core/core/server/data/importer/importers/data/data-importer.js:18 imports @tryghost/string/lib, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:test-suite-dependency] ghost/core/core/server/data/migrations/init/2-create-fixtures.js:1 — ghost/core/core/server/data/migrations/init/2-create-fixtures.js:1 imports ghost/core/core/server/data/schema/fixtures/index.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:third-party-deep-import] ghost/core/core/server/models/base/plugins/overrides.js:1 — ghost/core/core/server/models/base/plugins/overrides.js:1 imports bookshelf/lib/constants, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] ghost/core/core/server/services/email-address/email-address-parser.ts:1 — ghost/core/core/server/services/email-address/email-address-parser.ts:1 imports nodemailer/lib/addressparser, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] ghost/core/core/server/services/users.js:7 — ghost/core/core/server/services/users.js:7 imports @tryghost/domain-events/lib/DomainEvents, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/audio.ts:1 — koenig/kg-default-cards/src/cards/audio.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/before-after.ts:1 — koenig/kg-default-cards/src/cards/before-after.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/bookmark.ts:2 — koenig/kg-default-cards/src/cards/bookmark.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/button.ts:1 — koenig/kg-default-cards/src/cards/button.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/callout.ts:1 — koenig/kg-default-cards/src/cards/callout.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/code.ts:1 — koenig/kg-default-cards/src/cards/code.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/email-cta.ts:2 — koenig/kg-default-cards/src/cards/email-cta.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/email.ts:1 — koenig/kg-default-cards/src/cards/email.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/embed.ts:1 — koenig/kg-default-cards/src/cards/embed.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/file.ts:1 — koenig/kg-default-cards/src/cards/file.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/gallery.ts:8 — koenig/kg-default-cards/src/cards/gallery.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/header.ts:1 — koenig/kg-default-cards/src/cards/header.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/html.ts:1 — koenig/kg-default-cards/src/cards/html.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/image.ts:8 — koenig/kg-default-cards/src/cards/image.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/markdown.ts:2 — koenig/kg-default-cards/src/cards/markdown.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/product.ts:1 — koenig/kg-default-cards/src/cards/product.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • + 2 more in this group — see findings.md.
AC3 · Page structure · Data table has no header cells · ×19
  • Data table has no header cells REDACTED:258 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:107 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:115 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:120 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:126 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:130 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:157 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:107 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:115 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:120 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:126 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:130 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:157 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:102 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:110 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:115 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:121 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:125 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:152 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
D35 · Change Coupling · Change coupling · ×15
  • Change coupling: settings-fields.ts ↔ editor.ts apps/admin/src/editor/session/settings-fields.ts — `apps/admin/src/editor/session/settings-fields.ts` and `packages/testing/test-data/src/selectors/editor.ts` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `0237ab16` Added the X card pane to the React editor's settings sidebar (#30611); `78561ea0` Added the Facebook card pane to the React editor's settings sidebar (…; `771dde54` Added the Meta data section to the React editor's settings sidebar (#… — run `git show` on any of them.
  • Change coupling: table-lists.js ↔ schema.js ghost/core/core/server/data/exporter/table-lists.js — `ghost/core/core/server/data/exporter/table-lists.js` and `ghost/core/core/server/data/schema/schema.js` change together 82% of the time (14 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `fd4ca592` Added a table recording which metafields a member changed; `918c250d` Updated database for upcoming Tinybird automations sync (#30567); `115c9210` Added gift links service and admin API — run `git show` on any of them.
  • Change coupling: locations.tsx ↔ sources.tsx apps/admin/src/posts/analytics/web/components/locations.tsx — `apps/admin/src/posts/analytics/web/components/locations.tsx` and `apps/admin/src/posts/analytics/web/components/sources.tsx` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `bcf73020` Ported stats filter component and behavior to Post Analytics (#25641) (at that commit the files were still `apps/posts/src/views/PostAnalytics/Web/components/locations.tsx` and `apps/posts/src/views/PostAnalytics/Web/components/sources.tsx`); `ff7601c0` Ported stats filter component and behavior to Post Analytics (#25641) (at that commit the files were still `apps/posts/src/views/PostAnalytics/Web/components/locations.tsx` and `apps/posts/src/views/PostAnalytics/Web/components/sources.tsx`); `566b7180` Updated dark mode styles for stats overview (#24164) (at that commit the files were still `apps/posts/src/views/PostAnalytics/Web/components/Locations.tsx` and `apps/posts/src/views/PostAnalytics/Web/components/Sources.tsx`) — run `git show` on any of them.
  • Change coupling: settings-fields.ts ↔ post-settings-sidebar.tsx apps/admin/src/editor/session/settings-fields.ts — `apps/admin/src/editor/session/settings-fields.ts` and `apps/admin/src/editor/settings/post-settings-sidebar.tsx` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `0237ab16` Added the X card pane to the React editor's settings sidebar (#30611); `78561ea0` Added the Facebook card pane to the React editor's settings sidebar (…; `771dde54` Added the Meta data section to the React editor's settings sidebar (#… — run `git show` on any of them.
  • Change coupling: feed-list.tsx ↔ inbox-list.tsx apps/activitypub/src/views/feed/components/feed-list.tsx — `apps/activitypub/src/views/feed/components/feed-list.tsx` and `apps/activitypub/src/views/inbox/components/inbox-list.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `d0770050` Renamed Inbox and Feed to Reader and Notes in ActivityPub (#24115) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/InboxList.tsx`); `81f6471e` Added like count display in ActivityPub (#23677) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/InboxList.tsx`); `14adecfd` Added acceptance tests to `admin-x-activitypub` (#23562) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/InboxList.tsx`) — run `git show` on any of them.
  • Change coupling: koenig-editor-base.tsx ↔ member-email-editor.tsx apps/admin/src/settings/components/koenig-editor-base.tsx — `apps/admin/src/settings/components/koenig-editor-base.tsx` and `apps/admin/src/settings/membership/member-emails/member-email-editor.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `225c9793` Refactored email editor into a standalone component (#26796) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx`); `7a3f0ec8` Started handling clicks at bottom of welcome email editor (#26661) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx`); `32cc3763` Added image upload support to new welcome email editor (#26600) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx`) — run `git show` on any of them.
  • Change coupling: sources-card.tsx ↔ top-content.tsx apps/admin/src/analytics/views/stats/web/components/sources-card.tsx — `apps/admin/src/analytics/views/stats/web/components/sources-card.tsx` and `apps/admin/src/analytics/views/stats/web/components/top-content.tsx` change together 61% of the time (11 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `fea5fadd` 🎨 Improved analytics chart bucketing for Year to date and All time r… (at that commit the files were still `apps/admin/src/analytics/views/Stats/Web/components/sources-card.tsx` and `apps/admin/src/analytics/views/Stats/Web/components/top-content.tsx`); `cc4eee9c` Added filter dropdown for UTM fields (#25422) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/sources-card.tsx` and `apps/stats/src/views/Stats/Web/components/top-content.tsx`); `74205e4f` Added utm sources to Post Analytics > Web Sources (#24860) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/SourcesCard.tsx` and `apps/stats/src/views/Stats/Web/components/TopContent.tsx`) — run `git show` on any of them.
  • Change coupling: comments.js ↔ comments-service.js ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js — `ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js` and `ghost/core/core/server/services/comments/comments-service.js` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `5fdc8067` 🐛 Fixed comments on gated posts being hidden from readers without ac…; `e76828b3` Added comment dislike server support (#28020); `a1143ad6` Renamed comments `inReplyTo` relation to `in_reply_to` — run `git show` on any of them.
  • Change coupling: stats-service.js ↔ routes.js ghost/core/core/server/services/stats/stats-service.js — `ghost/core/core/server/services/stats/stats-service.js` and `ghost/core/core/server/web/api/endpoints/admin/routes.js` change together 56% of the time (15 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `f9b448ba` Removed /stats/utm-growth endpoint (#25900); `e62550f6` Added stats utm endpoints with fixture data (#25068) (at that commit the file was still `ghost/core/core/server/services/stats/StatsService.js`); `b2bf6315` Added JWT authentication for Tinybird API endpoints (#24133) (at that commit the file was still `ghost/core/core/server/services/stats/StatsService.js`) — run `git show` on any of them.
  • Change coupling: use-activity-pub-queries.ts ↔ explore.tsx apps/activitypub/src/hooks/use-activity-pub-queries.ts — `apps/activitypub/src/hooks/use-activity-pub-queries.ts` and `apps/activitypub/src/views/explore/explore.tsx` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `3f756554` Added topic filtering to Explore view with feature flag (#25438) (at that commit the file was still `apps/activitypub/src/views/Explore/Explore.tsx`); `76da41d1` Added profile preview card on hover feature to ActivityPub (#25049) (at that commit the files were still `apps/admin-x-activitypub/src/hooks/use-activity-pub-queries.ts` and `apps/admin-x-activitypub/src/views/Explore/Explore.tsx`); `9dbdfca6` Removed follow button from own profile in ActivityPub (#24104) (at that commit the files were still `apps/admin-x-activitypub/src/hooks/use-activity-pub-queries.ts` and `apps/admin-x-activitypub/src/views/Explore/Explore.tsx`) — run `git show` on any of them.
  • Change coupling: activity-item.tsx ↔ profile.tsx apps/activitypub/src/components/activities/activity-item.tsx — `apps/activitypub/src/components/activities/activity-item.tsx` and `apps/activitypub/src/views/profile/profile.tsx` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `065c113a` Adjusted spacing of activity items in ActivityPub (#22343) (at that commit the files were still `apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx` and `apps/admin-x-activitypub/src/views/Profile/Profile.tsx`); `4d36d0b7` ActivityPub UI design refinements (#22242) (at that commit the files were still `apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx` and `apps/admin-x-activitypub/src/views/Profile/Profile.tsx`); `ec327bad` Used new feed and inbox endpoints for feed and inbox view (at that commit the files were still `apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx` and `apps/admin-x-activitypub/src/components/Profile.tsx`) — run `git show` on any of them.
  • Change coupling: card.tsx ↔ tabs.tsx apps/shade/src/components/ui/card.tsx — `apps/shade/src/components/ui/card.tsx` and `apps/shade/src/components/ui/tabs.tsx` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f364a9f1` Shade component cleanup (#27565); `5e02c7a5` Improved responsive design in site-wide analytics (#24059); `cb9d9a28` Added state handling for no paid memberships (#23933) — run `git show` on any of them.
  • Change coupling: koenig-editor-base.tsx ↔ welcome-email-modal.tsx apps/admin/src/settings/components/koenig-editor-base.tsx — `apps/admin/src/settings/components/koenig-editor-base.tsx` and `apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `bac54d99` Removed legacy settings dirty and focus contexts (#29545) (at that commit the files were still `apps/admin-x-settings/src/components/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx`); `225c9793` Refactored email editor into a standalone component (#26796) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx`); `7a3f0ec8` Started handling clicks at bottom of welcome email editor (#26661) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/welcome-email-modal.tsx`) — run `git show` on any of them.
  • Change coupling: gift-success-page.jsx ↔ magic-link-page.jsx apps/portal/src/components/pages/gift-success-page.jsx — `apps/portal/src/components/pages/gift-success-page.jsx` and `apps/portal/src/components/pages/magic-link-page.jsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `966c1ba1` Cleaned up gift subscription screens (#27825) (at that commit the files were still `apps/portal/src/components/pages/gift-success-page.js` and `apps/portal/src/components/pages/magic-link-page.js`); `9c0edb73` Improved gift subscription Portal screens across selection, preview, … (at that commit the files were still `apps/portal/src/components/pages/gift-success-page.js` and `apps/portal/src/components/pages/magic-link-page.js`); `29f8ab36` Polished Portal gift card design (#27757) (at that commit the files were still `apps/portal/src/components/pages/gift-success-page.js` and `apps/portal/src/components/pages/magic-link-page.js`) — run `git show` on any of them.
  • Change coupling: feed-item.tsx ↔ posts.ts apps/activitypub/src/components/feed/feed-item.tsx — `apps/activitypub/src/components/feed/feed-item.tsx` and `apps/activitypub/src/utils/posts.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `15f6da95` Add ActivityPub sensitive media controls (#29054); `3ae1986b` Fixed social web handle not being constructed from API in Notes/Reade…; `ac625bec` Added unfollow option to feed item menu in ActivityPub (#24011) (at that commit the files were still `apps/admin-x-activitypub/src/components/feed/FeedItem.tsx` and `apps/admin-x-activitypub/src/utils/posts.ts`) — run `git show` on any of them.
D3 · God Classes · MethodTooLong · ×13
  • MethodTooLong: ProductRepository.update ghost/core/core/server/services/members/members-api/repositories/product-repository.js:374 — MethodTooLong — update runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PostsStatsService.getTopPostsViews ghost/core/core/server/services/stats/posts-stats-service.js:1256 — MethodTooLong — getTopPostsViews runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GiftDeliveryService.send ghost/core/core/server/services/gifts/gift-delivery-service.ts:229 — MethodTooLong — send runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.fetchLinkData REDACTED:668 — MethodTooLong — fetchLinkData runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MembersCSVImporter.writeRows ghost/core/core/server/services/members/import-export/import/importer.ts:421 — MethodTooLong — writeRows runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: KoenigLexicalEditor.ReactComponent apps/ember-admin/app/components/koenig-lexical-editor.js:341 — MethodTooLong — ReactComponent runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EmailServiceWrapper.init ghost/core/core/server/services/email-service/email-service-wrapper.js:18 — MethodTooLong — init runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GiftService.startCheckout ghost/core/core/server/services/gifts/gift-service.ts:331 — MethodTooLong — startCheckout runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MembersStripeCustomersSubscriptionsImporter.generate ghost/core/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js:100 — MethodTooLong — generate runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProductRepository.create ghost/core/core/server/services/members/members-api/repositories/product-repository.js:174 — MethodTooLong — create runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ContentCSVImporter.processRows ghost/core/core/server/services/content-import/import/importer.ts:239 — MethodTooLong — processRows runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MemberWelcomeEmailRenderer.render ghost/core/core/server/services/member-welcome-emails/member-welcome-email-renderer.js:128 — MethodTooLong — render runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.getPageFromLinkPath REDACTED:1169 — MethodTooLong — getPageFromLinkPath runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · ClassTooLong · ×10
  • ClassTooLong: App REDACTED:85 — ClassTooLong — 980 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 580 over it, 2.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PostsStatsService ghost/core/core/server/services/stats/posts-stats-service.js:80 — ClassTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 537 over it, 2.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LexicalEditorController REDACTED:148 — ClassTooLong — 814 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 414 over it, 2.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GiftService ghost/core/core/server/services/gifts/gift-service.ts:324 — ClassTooLong — 794 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 394 over it, 1.99× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BatchSendingService ghost/core/core/server/services/email-service/batch-sending-service.js:28 — ClassTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 173 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MemberWelcomeEmailService ghost/core/core/server/services/member-welcome-emails/service.js:57 — ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 104 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CommentsService ghost/core/core/server/services/comments/comments-service.js:103 — ClassTooLong — 462 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 62 over it, 1.16× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DockerAnalyticsManager ghost/core/core/server/data/tinybird/scripts/docker-analytics-manager.js:32 — ClassTooLong — 445 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 45 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: StaffServiceEmails ghost/core/core/server/services/staff/staff-service-emails.js:7 — ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 40 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BillingService apps/ember-admin/app/services/billing.js:39 — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
AC3 · Page structure · Page without a main landmark · ×8
  • Page without a main landmark .github/embed-renderer/404.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark apps/admin/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark apps/ember-admin/app/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark apps/signup-form/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark apps/signup-form/preview.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: LexicalEditorController REDACTED:148 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ActivityPubAPI apps/activitypub/src/api/activitypub.ts:307 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: App REDACTED:85 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CommentsService ghost/core/core/server/services/comments/comments-service.js:103 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GhPostSettingsMenu apps/ember-admin/app/components/gh-post-settings-menu.js:12 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BillingService apps/ember-admin/app/services/billing.js:39 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GiftService ghost/core/core/server/services/gifts/gift-service.ts:324 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
AC2 · Forms & labels · <Select> field component without a label · ×6
  • <Select> field component without a label apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:267 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:407 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:148 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/admin/src/settings/email-design/design-fields/body-font-field.tsx:16 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/admin/src/settings/email-design/design-fields/heading-font-field.tsx:20 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/admin/src/settings/email-design/design-fields/heading-weight-field.tsx:20 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D31 · IaC & Container Security · REDACTED IaC · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: editor-session.ts → editor-screen.tsx, post-settings-sidebar.tsx, editor.ts apps/admin/src/editor/session/editor-session.ts — `apps/admin/src/editor/session/editor-session.ts` changes together with 3 other files — `apps/admin/src/editor/editor-screen.tsx`, `apps/admin/src/editor/settings/post-settings-sidebar.tsx`, `packages/testing/test-data/src/selectors/editor.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: editor.screen.ts → editor-screen.tsx, editor-session.ts, settings-fields.ts, post-settings-sidebar.tsx apps/admin/src/editor/editor.screen.ts — `apps/admin/src/editor/editor.screen.ts` changes together with 4 other files — `apps/admin/src/editor/editor-screen.tsx`, `apps/admin/src/editor/session/editor-session.ts`, `apps/admin/src/editor/session/settings-fields.ts`, `apps/admin/src/editor/settings/post-settings-sidebar.tsx` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: stats.js → content-stats-service.js, posts-stats-service.js, stats-service.js ghost/core/core/server/api/endpoints/stats.js — `ghost/core/core/server/api/endpoints/stats.js` changes together with 3 other files — `ghost/core/core/server/services/stats/content-stats-service.js`, `ghost/core/core/server/services/stats/posts-stats-service.js`, `ghost/core/core/server/services/stats/stats-service.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: REDACTED → posts.ts, feed-list.tsx, note.tsx REDACTED — `REDACTED` changes together with 3 other files — `apps/activitypub/src/utils/posts.ts`, `apps/activitypub/src/views/feed/components/feed-list.tsx`, `apps/activitypub/src/views/feed/note.tsx` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
AC2 · Forms & labels · <fieldset> without a <legend> · ×3
  • <fieldset> without a <legend> REDACTED:2 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> REDACTED:1 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> REDACTED:11 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
AC1 · Text alternatives · <video> without a captions track · ×2
  • <video> without a captions track apps/activitypub/src/components/feed/feed-item.tsx:176 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
  • <video> without a captions track apps/activitypub/src/components/feed/feed-item.tsx:443 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC2 · Forms & labels · <RadioGroup> field component without a label · ×2
  • <RadioGroup> field component without a label apps/admin/src/editor/publish/components/publish-at-options.tsx:25 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <RadioGroup> field component without a label apps/admin/src/editor/publish/components/publish-type-options.tsx:53 — This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC6 · Visual & motion safety · REDACTED contrast Tailwind colour pair (2.3 · ×2
  • REDACTED contrast Tailwind colour pair (2.3:1) apps/activitypub/src/components/layout/onboarding/step-3.tsx:130 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • REDACTED contrast Tailwind colour pair (2.3:1) apps/activitypub/src/components/layout/onboarding/step-3.tsx:231 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
AC6 · Visual & motion safety · Focus outline removed inline · ×2
  • Focus outline removed inline REDACTED:49 — outline:none/0 in an inline style removes the keyboard focus ring with no chance of a :focus replacement. Keep a visible focus indicator.
  • Focus outline removed inline REDACTED:65 — outline:none/0 in an inline style removes the keyboard focus ring with no chance of a :focus replacement. Keep a visible focus indicator.
D2 · Cognitive Complexity · App.componentDidUpdate (cognitive 20) · ×2
  • App.componentDidUpdate (cognitive 20) REDACTED:125 — App.componentDidUpdate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App.componentDidUpdate (cognitive 20) apps/sodo-search/src/app.jsx:41 — App.componentDidUpdate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
R7 · Dead Code · Dead file (~243 LoC) · ×2
  • Dead file (~243 LoC) apps/ember-admin/app/adapters/embedded-relation-adapter.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~243 LoC) apps/ember-admin/app/components/gh-token-input.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
AC2 · Forms & labels · <SearchInput> field component without a label · ×1
  • <SearchInput> field component without a label apps/activitypub/src/components/layout/sidebar/sidebar.tsx:66 — This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure · Heading level jumps from h1 to h4 · ×1
  • Heading level jumps from h1 to h4 REDACTED:57 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×1
  • Heading level jumps from h2 to h4 REDACTED:47 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Anchor without href · ×1
  • Anchor without href apps/activitypub/src/components/layout/error/error.tsx:119 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
AC6 · Visual & motion safety · REDACTED contrast colour pair in CSS (1.2 · ×1
  • REDACTED contrast colour pair in CSS (1.2:1) ghost/core/core/server/services/email-service/email-templates/partials/styles.hbs:1 — `.kg-header-card.kg-style-image` sets color: #ffffff on background-color: #e7e7eb — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · REDACTED contrast colour pair in CSS (3.6 · ×1
  • REDACTED contrast colour pair in CSS (3.6:1) apps/ember-admin/app/styles/components/pagination.css:54 — `.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus` sets color: #fff on background-color: #428bca — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 1102 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · linkSubscription (cyclomatic 131) · ×1
  • linkSubscription (cyclomatic 131) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223 — linkSubscription has cyclomatic complexity 131 (threshold 15). Of this number, 124 points are the body's own statements and 7 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · save-engine.createSaveEngine (cyclomatic 130) · ×1
  • save-engine.createSaveEngine (cyclomatic 130) apps/admin/src/editor/engine/save-engine.ts:364 — save-engine.createSaveEngine has cyclomatic complexity 130 (threshold 15). Of this number, 115 points are the body's own statements and 15 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · onSaving (cyclomatic 120) · ×1
  • onSaving (cyclomatic 120) ghost/core/core/server/models/post.js:572 — onSaving has cyclomatic complexity 120 (threshold 15). Of this number, 113 points are the body's own statements and 7 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · theme-code-editor-modal.ThemeCodeEditorModal (cyclomatic 113) · ×1
  • theme-code-editor-modal.ThemeCodeEditorModal (cyclomatic 113) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298 — theme-code-editor-modal.ThemeCodeEditorModal has cyclomatic complexity 113 (threshold 15). Of this number, 24 points are the body's own statements and 89 belong to 19 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · feed-item.FeedItem (cyclomatic 109) · ×1
  • feed-item.FeedItem (cyclomatic 109) apps/activitypub/src/components/feed/feed-item.tsx:506 — feed-item.FeedItem has cyclomatic complexity 109 (threshold 15). Of this number, 76 points are the body's own statements and 33 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · api.setupGhostApi (cyclomatic 107) · ×1
  • api.setupGhostApi (cyclomatic 107) apps/portal/src/utils/api.js:4 — api.setupGhostApi has cyclomatic complexity 107 (threshold 15). Of this number, 72 points are the body's own statements and 35 belong to 29 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · newsletter-preview-content.NewsletterPreviewContent (cyclomatic 98) · ×1
  • newsletter-preview-content.NewsletterPreviewContent (cyclomatic 98) REDACTED:56 — newsletter-preview-content.NewsletterPreviewContent has cyclomatic complexity 98 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · reader.Reader (cyclomatic 92) · ×1
  • reader.Reader (cyclomatic 92) REDACTED:535 — reader.Reader has cyclomatic complexity 92 (threshold 15). Of this number, 47 points are the body's own statements and 45 belong to 16 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · editor-session.createEditorSession (cyclomatic 92) · ×1
  • editor-session.createEditorSession (cyclomatic 92) apps/admin/src/editor/session/editor-session.ts:216 — editor-session.createEditorSession has cyclomatic complexity 92 (threshold 15). Of this number, 66 points are the body's own statements and 26 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tag-detail.TagDetail (cyclomatic 87) · ×1
  • tag-detail.TagDetail (cyclomatic 87) apps/admin/src/tags/detail/tag-detail.tsx:54 — tag-detail.TagDetail has cyclomatic complexity 87 (threshold 15). Of this number, 47 points are the body's own statements and 40 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · notifications.Notifications (cyclomatic 86) · ×1
  • notifications.Notifications (cyclomatic 86) apps/activitypub/src/views/notifications/notifications.tsx:306 — notifications.Notifications has cyclomatic complexity 86 (threshold 15). Of this number, 44 points are the body's own statements and 42 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · filters.Filters (cyclomatic 84) · ×1
  • filters.Filters (cyclomatic 84) apps/shade/src/components/patterns/filters.tsx:2947 — filters.Filters has cyclomatic complexity 84 (threshold 15). Of this number, 28 points are the body's own statements and 56 belong to 18 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · domain.Domain (cyclomatic 83) · ×1
  • domain.Domain (cyclomatic 83) apps/activitypub/src/views/preferences/components/domain.tsx:88 — domain.Domain has cyclomatic complexity 83 (threshold 15). Of this number, 64 points are the body's own statements and 19 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · new-note-modal.NewNoteModal (cyclomatic 79) · ×1
  • new-note-modal.NewNoteModal (cyclomatic 79) apps/activitypub/src/components/modals/new-note-modal.tsx:44 — new-note-modal.NewNoteModal has cyclomatic complexity 79 (threshold 15). Of this number, 29 points are the body's own statements and 50 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tier-detail-modal.TierDetailModalContent (cyclomatic 79) · ×1
  • tier-detail-modal.TierDetailModalContent (cyclomatic 79) apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:61 — tier-detail-modal.TierDetailModalContent has cyclomatic complexity 79 (threshold 15). Of this number, 42 points are the body's own statements and 37 belong to 19 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · filters.FilterValueSelector (cyclomatic 79) · ×1
  • filters.FilterValueSelector (cyclomatic 79) apps/shade/src/components/patterns/filters.tsx:2182 — filters.FilterValueSelector has cyclomatic complexity 79 (threshold 15). Of this number, 63 points are the body's own statements and 16 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · post-preview-modal.PostPreviewModal (cyclomatic 77) · ×1
  • post-preview-modal.PostPreviewModal (cyclomatic 77) apps/admin/src/editor/preview/post-preview-modal.tsx:80 — post-preview-modal.PostPreviewModal has cyclomatic complexity 77 (threshold 15). Of this number, 56 points are the body's own statements and 21 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · member-detail.MemberDetailPage (cyclomatic 75) · ×1
  • member-detail.MemberDetailPage (cyclomatic 75) apps/admin/src/members/detail/member-detail.tsx:67 — member-detail.MemberDetailPage has cyclomatic complexity 75 (threshold 15). Of this number, 47 points are the body's own statements and 28 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · editor.AutomationEditorContent (cyclomatic 74) · ×1
  • editor.AutomationEditorContent (cyclomatic 74) apps/admin/src/automations/editor.tsx:67 — editor.AutomationEditorContent has cyclomatic complexity 74 (threshold 15). Of this number, 33 points are the body's own statements and 41 belong to 12 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · gift-page.GiftPage (cyclomatic 73) · ×1
  • gift-page.GiftPage (cyclomatic 73) apps/portal/src/components/pages/gift-page.tsx:84 — gift-page.GiftPage has cyclomatic complexity 73 (threshold 15). Of this number, 32 points are the body's own statements and 41 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · add-offer-modal.AddOfferModal (cyclomatic 72) · ×1
  • add-offer-modal.AddOfferModal (cyclomatic 72) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:454 — add-offer-modal.AddOfferModal has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 10 of the 72 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 540, 748, 817, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · global-settings.GlobalSettings (cyclomatic 69) · ×1
  • global-settings.GlobalSettings (cyclomatic 69) apps/admin/src/settings/site/design-and-branding/global-settings.tsx:101 — global-settings.GlobalSettings has cyclomatic complexity 69 (threshold 15). Of this number, 18 points are the body's own statements and 51 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · user-detail-modal.UserDetailModalContent (cyclomatic 69) · ×1
  • user-detail-modal.UserDetailModalContent (cyclomatic 69) apps/admin/src/settings/general/user-detail-modal.tsx:121 — user-detail-modal.UserDetailModalContent has cyclomatic complexity 69 (threshold 15). Of this number, 37 points are the body's own statements and 32 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · newsletter.Newsletter (cyclomatic 66) · ×1
  • newsletter.Newsletter (cyclomatic 66) apps/admin/src/posts/analytics/newsletter/newsletter.tsx:102 — newsletter.Newsletter has cyclomatic complexity 66 (threshold 15). Of this number, 44 points are the body's own statements and 22 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · edit-retention-offer-modal.EditRetentionOfferModal (cyclomatic 66) · ×1
  • edit-retention-offer-modal.EditRetentionOfferModal (cyclomatic 66) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:503 — edit-retention-offer-modal.EditRetentionOfferModal has cyclomatic complexity 66 (threshold 15). Most of this is not in the body itself: 9 of the 66 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 586, 675, 563, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · change-tracker.createChangeTracker (cyclomatic 63) · ×1
  • change-tracker.createChangeTracker (cyclomatic 63) apps/admin/src/editor/engine/change-tracker.ts:233 — change-tracker.createChangeTracker has cyclomatic complexity 63 (threshold 15). Of this number, 62 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · description.getDescription (cyclomatic 61) · ×1
  • description.getDescription (cyclomatic 61) ghost/core/core/frontend/meta/description.js:5 — description.getDescription has cyclomatic complexity 61 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · settings-modal.SettingsModal (cyclomatic 59) · ×1
  • settings-modal.SettingsModal (cyclomatic 59) apps/shade/src/components/patterns/settings-modal.tsx:130 — settings-modal.SettingsModal has cyclomatic complexity 59 (threshold 15). Of this number, 46 points are the body's own statements and 13 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · profile-page.ProfilePage (cyclomatic 58) · ×1
  • profile-page.ProfilePage (cyclomatic 58) apps/activitypub/src/views/profile/components/profile-page.tsx:58 — profile-page.ProfilePage has cyclomatic complexity 58 (threshold 15). Of this number, 45 points are the body's own statements and 13 belong to 9 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · profile.ProfileCard (cyclomatic 57) · ×1
  • profile.ProfileCard (cyclomatic 57) apps/activitypub/src/views/preferences/components/profile.tsx:54 — profile.ProfileCard has cyclomatic complexity 57 (threshold 15). Of this number, 45 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · newsletters-kpis.NewsletterKPIs (cyclomatic 57) · ×1
  • newsletters-kpis.NewsletterKPIs (cyclomatic 57) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:110 — newsletters-kpis.NewsletterKPIs has cyclomatic complexity 57 (threshold 15). Of this number, 38 points are the body's own statements and 19 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · publish-options.createPublishOptions (cyclomatic 57) · ×1
  • publish-options.createPublishOptions (cyclomatic 57) apps/admin/src/editor/publish/publish-options.ts:329 — publish-options.createPublishOptions has cyclomatic complexity 57 (threshold 15). Of this number, 23 points are the body's own statements and 34 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · import-members-modal.ImportMembersModal (cyclomatic 55) · ×1
  • import-members-modal.ImportMembersModal (cyclomatic 55) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:68 — import-members-modal.ImportMembersModal has cyclomatic complexity 55 (threshold 15). Of this number, 16 points are the body's own statements and 39 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · update (cyclomatic 55) · ×1
  • update (cyclomatic 55) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:664 — update has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mapping-step.MappingStep (cyclomatic 54) · ×1
  • mapping-step.MappingStep (cyclomatic 54) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx:105 — mapping-step.MappingStep has cyclomatic complexity 54 (threshold 15). Of this number, 17 points are the body's own statements and 37 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · newsletter-detail-modal.Sidebar (cyclomatic 53) · ×1
  • newsletter-detail-modal.Sidebar (cyclomatic 53) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:166 — newsletter-detail-modal.Sidebar has cyclomatic complexity 53 (threshold 15). Of this number, 28 points are the body's own statements and 25 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · authors.extendModel (cyclomatic 53) · ×1
  • authors.extendModel (cyclomatic 53) ghost/core/core/server/models/relations/authors.js:32 — authors.extendModel has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 1 of the 53 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 340, 141, 40, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · service.createLlmsService (cyclomatic 53) · ×1
  • service.createLlmsService (cyclomatic 53) ghost/core/core/frontend/services/llms/service.js:33 — service.createLlmsService has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · slug-machine.createSlugMachine (cyclomatic 52) · ×1
  • slug-machine.createSlugMachine (cyclomatic 52) apps/admin/src/editor/engine/slug-machine.ts:123 — slug-machine.createSlugMachine has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 9 of the 52 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 358, 263, 297, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · posts.default (cyclomatic 52) · ×1
  • posts.default (cyclomatic 52) ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js:24 — posts.default has cyclomatic complexity 52 (threshold 15). Of this number, 37 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ghost_head (cyclomatic 52) · ×1
  • ghost_head (cyclomatic 52) ghost/core/core/frontend/helpers/ghost_head.js:359 — ghost_head has cyclomatic complexity 52 (threshold 15). Of this number, 51 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · import-members-modal.ImportMembersModal (cyclomatic 51) · ×1
  • import-members-modal.ImportMembersModal (cyclomatic 51) apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:42 — import-members-modal.ImportMembersModal has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 12 of the 51 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 217, 108, 195, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · overview.Overview (cyclomatic 50) · ×1
  • overview.Overview (cyclomatic 50) apps/admin/src/posts/analytics/overview/overview.tsx:51 — overview.Overview has cyclomatic complexity 50 (threshold 15). Of this number, 39 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-publish-flow.usePublishFlow (cyclomatic 50) · ×1
  • use-publish-flow.usePublishFlow (cyclomatic 50) apps/admin/src/editor/publish/use-publish-flow.ts:98 — use-publish-flow.usePublishFlow has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 1 of the 50 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 385, 483, 228, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · App.fetchQueryStrData (cyclomatic 50) · ×1
  • App.fetchQueryStrData (cyclomatic 50) REDACTED:492 — App.fetchQueryStrData has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · newsletter-preview.NewsletterPreview (cyclomatic 49) · ×1
  • newsletter-preview.NewsletterPreview (cyclomatic 49) apps/admin/src/settings/email/newsletters/newsletter-preview.tsx:9 — newsletter-preview.NewsletterPreview has cyclomatic complexity 49 (threshold 15). Of this number, 26 points are the body's own statements and 23 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · session-service.createSessionService (cyclomatic 49) · ×1
  • session-service.createSessionService (cyclomatic 49) ghost/core/core/server/services/auth/session/session-service.js:66 — session-service.createSessionService has cyclomatic complexity 49 (threshold 15). Of this number, 47 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · member-activity.ActivityPage (cyclomatic 48) · ×1
  • member-activity.ActivityPage (cyclomatic 48) apps/admin/src/members/activity/member-activity.tsx:48 — member-activity.ActivityPage has cyclomatic complexity 48 (threshold 15). Of this number, 36 points are the body's own statements and 12 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.fetchLinkData (cyclomatic 48) · ×1
  • App.fetchLinkData (cyclomatic 48) REDACTED:668 — App.fetchLinkData has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · permissible (cyclomatic 48) · ×1
  • permissible (cyclomatic 48) ghost/core/core/server/models/user.js:881 — permissible has cyclomatic complexity 48 (threshold 15). Of this number, 36 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · reader.ArticleBody (cyclomatic 47) · ×1
  • reader.ArticleBody (cyclomatic 47) REDACTED:75 — reader.ArticleBody has cyclomatic complexity 47 (threshold 15). Of this number, 23 points are the body's own statements and 24 belong to 12 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · member-event.getAction (cyclomatic 47) · ×1
  • member-event.getAction (cyclomatic 47) apps/admin/src/members/detail/member-event.ts:240 — member-event.getAction has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · edit-profile.EditProfile (cyclomatic 45) · ×1
  • edit-profile.EditProfile (cyclomatic 45) apps/activitypub/src/views/preferences/components/edit-profile.tsx:63 — edit-profile.EditProfile has cyclomatic complexity 45 (threshold 15). Of this number, 23 points are the body's own statements and 22 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · automation-canvas.AutomationCanvas (cyclomatic 45) · ×1
  • automation-canvas.AutomationCanvas (cyclomatic 45) apps/admin/src/automations/components/canvas/automation-canvas.tsx:388 — automation-canvas.AutomationCanvas has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 14 of the 45 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 639, 421, 470, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · search.Search (cyclomatic 44) · ×1
  • search.Search (cyclomatic 44) apps/activitypub/src/components/modals/search.tsx:53 — search.Search has cyclomatic complexity 44 (threshold 15). Of this number, 18 points are the body's own statements and 26 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · source-utils.processSources (cyclomatic 44) · ×1
  • source-utils.processSources (cyclomatic 44) apps/admin-x-framework/src/utils/source-utils.ts:284 — source-utils.processSources has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 14 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 307, 390). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · post-editor.PostEditor (cyclomatic 44) · ×1
  • post-editor.PostEditor (cyclomatic 44) apps/admin/src/editor/post-editor.tsx:92 — post-editor.PostEditor has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 7 of the 44 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 170, 199, 158, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · chip-picker.ChipPicker (cyclomatic 44) · ×1
  • chip-picker.ChipPicker (cyclomatic 44) apps/admin/src/shared/pickers/chip-picker.tsx:77 — chip-picker.ChipPicker has cyclomatic complexity 44 (threshold 15). Of this number, 16 points are the body's own statements and 28 belong to 9 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · note.Note (cyclomatic 43) · ×1
  • note.Note (cyclomatic 43) apps/activitypub/src/views/feed/note.tsx:25 — note.Note has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 13 of the 43 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 287, 65, 55, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sidebar.Sidebar (cyclomatic 43) · ×1
  • sidebar.Sidebar (cyclomatic 43) apps/admin/src/settings/layout/sidebar.tsx:115 — sidebar.Sidebar has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 15 of the 43 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 172, 133, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · post-analytics-header.PostAnalyticsHeader (cyclomatic 43) · ×1
  • post-analytics-header.PostAnalyticsHeader (cyclomatic 43) apps/admin/src/posts/analytics/components/post-analytics-header.tsx:66 — post-analytics-header.PostAnalyticsHeader has cyclomatic complexity 43 (threshold 15). Of this number, 31 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ParseMemberEventHelper.getAction (cyclomatic 43) · ×1
  • ParseMemberEventHelper.getAction (cyclomatic 43) apps/ember-admin/app/helpers/parse-member-event.js:194 — ParseMemberEventHelper.getAction has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · paid-subscription-change-chart.PaidMembersChangeChart (cyclomatic 42) · ×1
  • paid-subscription-change-chart.PaidMembersChangeChart (cyclomatic 42) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:180 — paid-subscription-change-chart.PaidMembersChangeChart has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 6 of the 42 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 217, 465, 200, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · update-flow-modal.KeyedUpdateFlowModal (cyclomatic 42) · ×1
  • update-flow-modal.KeyedUpdateFlowModal (cyclomatic 42) apps/admin/src/editor/publish/update-flow-modal.tsx:54 — update-flow-modal.KeyedUpdateFlowModal has cyclomatic complexity 42 (threshold 15). Of this number, 34 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · comments.commentMapper (cyclomatic 42) · ×1
  • comments.commentMapper (cyclomatic 42) ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:51 — comments.commentMapper has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · #mapPosts (cyclomatic 42) · ×1
  • #mapPosts (cyclomatic 42) ghost/core/core/server/services/posts/posts-exporter.js:192 — #mapPosts has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 14 of the 42 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 205, 229, 238, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · latest-post.LatestPost (cyclomatic 41) · ×1
  • latest-post.LatestPost (cyclomatic 41) apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:52 — latest-post.LatestPost has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · email-content-modal.EmailContentModal (cyclomatic 41) · ×1
  • email-content-modal.EmailContentModal (cyclomatic 41) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:124 — email-content-modal.EmailContentModal has cyclomatic complexity 41 (threshold 15). Of this number, 20 points are the body's own statements and 21 belong to 12 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · profile.Profile (cyclomatic 40) · ×1
  • profile.Profile (cyclomatic 40) apps/activitypub/src/views/preferences/components/profile.tsx:242 — profile.Profile has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 255, 315, 289, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · custom-field-modal.CustomFieldModal (cyclomatic 40) · ×1
  • custom-field-modal.CustomFieldModal (cyclomatic 40) apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx:43 — custom-field-modal.CustomFieldModal has cyclomatic complexity 40 (threshold 15). Of this number, 27 points are the body's own statements and 13 belong to 9 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MembersCSVImporter.writeRows (cyclomatic 40) · ×1
  • MembersCSVImporter.writeRows (cyclomatic 40) ghost/core/core/server/services/members/import-export/import/importer.ts:421 — MembersCSVImporter.writeRows has cyclomatic complexity 40 (threshold 15). Of this number, 37 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProductRepository.update (cyclomatic 40) · ×1
  • ProductRepository.update (cyclomatic 40) ghost/core/core/server/services/members/members-api/repositories/product-repository.js:374 — ProductRepository.update has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · title.getTitle (cyclomatic 40) · ×1
  • title.getTitle (cyclomatic 40) ghost/core/core/frontend/meta/title.js:11 — title.getTitle has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · create (cyclomatic 40) · ×1
  • create (cyclomatic 40) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:425 — create has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · feed-item.renderFeedAttachment (cyclomatic 39) · ×1
  • feed-item.renderFeedAttachment (cyclomatic 39) apps/activitypub/src/components/feed/feed-item.tsx:78 — feed-item.renderFeedAttachment has cyclomatic complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · growth.Growth (cyclomatic 39) · ×1
  • growth.Growth (cyclomatic 39) apps/admin/src/analytics/views/stats/growth/growth.tsx:74 — growth.Growth has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 14 of the 39 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 313, 156, 119, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · LexicalEditorController.saveTask (cyclomatic 39) · ×1
  • LexicalEditorController.saveTask (cyclomatic 39) REDACTED:591 — LexicalEditorController.saveTask has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · filters.ResolvedSelectOptionsPopover (cyclomatic 39) · ×1
  • filters.ResolvedSelectOptionsPopover (cyclomatic 39) apps/shade/src/components/patterns/filters.tsx:1815 — filters.ResolvedSelectOptionsPopover has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 13 of the 39 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 1947, 2068, 1931, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · reactAppConfig (cyclomatic 39) · ×1
  • reactAppConfig (cyclomatic 39) configs/eslint-react/index.mjs:139 — reactAppConfig has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · profile-preview-hover-card.ProfilePreviewHoverCard (cyclomatic 38) · ×1
  • profile-preview-hover-card.ProfilePreviewHoverCard (cyclomatic 38) apps/activitypub/src/components/global/profile-preview-hover-card.tsx:35 — profile-preview-hover-card.ProfilePreviewHoverCard has cyclomatic complexity 38 (threshold 15). Of this number, 30 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · web.Web (cyclomatic 38) · ×1
  • web.Web (cyclomatic 38) apps/admin/src/posts/analytics/web/web.tsx:45 — web.Web has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 105, 157, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · members.MembersPage (cyclomatic 38) · ×1
  • members.MembersPage (cyclomatic 38) apps/admin/src/members/members.tsx:46 — members.MembersPage has cyclomatic complexity 38 (threshold 15). Of this number, 35 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · welcome-email-customize-modal.WelcomeEmailCustomizeModal (cyclomatic 38) · ×1
  • welcome-email-customize-modal.WelcomeEmailCustomizeModal (cyclomatic 38) apps/admin/src/settings/membership/member-emails/welcome-email-customize-modal.tsx:299 — welcome-email-customize-modal.WelcomeEmailCustomizeModal has cyclomatic complexity 38 (threshold 15). Of this number, 19 points are the body's own statements and 19 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app.App (cyclomatic 38) · ×1
  • app.App (cyclomatic 38) apps/comments-ui/src/app.tsx:36 — app.App has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 3 of the 38 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 312, 155, 249, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · notification.NotificationText (cyclomatic 38) · ×1
  • notification.NotificationText (cyclomatic 38) apps/portal/src/components/notification.jsx:31 — notification.NotificationText has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · email-sending-status-provider.EmailSendingStatusProvider (cyclomatic 37) · ×1
  • email-sending-status-provider.EmailSendingStatusProvider (cyclomatic 37) apps/admin/src/posts/analytics/email-sending-status/email-sending-status-provider.tsx:25 — email-sending-status-provider.EmailSendingStatusProvider has cyclomatic complexity 37 (threshold 15). Of this number, 27 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · getTemplateData (cyclomatic 37) · ×1
  • getTemplateData (cyclomatic 37) ghost/core/core/server/services/email-service/email-renderer.js:1288 — getTemplateData has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · change-password-form.ChangePasswordForm (cyclomatic 36) · ×1
  • change-password-form.ChangePasswordForm (cyclomatic 36) apps/admin/src/settings/general/users/change-password-form.tsx:52 — change-password-form.ChangePasswordForm has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 14 of the 36 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 73, 167, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · add-offer-modal.Sidebar (cyclomatic 36) · ×1
  • add-offer-modal.Sidebar (cyclomatic 36) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:131 — add-offer-modal.Sidebar has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · access.Access (cyclomatic 36) · ×1
  • access.Access (cyclomatic 36) apps/admin/src/settings/membership/access.tsx:135 — access.Access has cyclomatic complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · api.setupGhostApi (cyclomatic 36) · ×1
  • api.setupGhostApi (cyclomatic 36) apps/comments-ui/src/utils/api.ts:3 — api.setupGhostApi has cyclomatic complexity 36 (threshold 15). Of this number, 18 points are the body's own statements and 18 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PopupContent.render (cyclomatic 36) · ×1
  • PopupContent.render (cyclomatic 36) REDACTED:156 — PopupContent.render has cyclomatic complexity 36 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · foreach.foreach (cyclomatic 36) · ×1
  • foreach.foreach (cyclomatic 36) ghost/core/core/frontend/helpers/foreach.js:22 — foreach.foreach has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · design-and-theme-modal.DesignAndThemeModal (cyclomatic 35) · ×1
  • design-and-theme-modal.DesignAndThemeModal (cyclomatic 35) apps/admin/src/settings/site/design-and-theme-modal.tsx:11 — design-and-theme-modal.DesignAndThemeModal has cyclomatic complexity 35 (threshold 15). Of this number, 17 points are the body's own statements and 18 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · signup-options.SignupOptions (cyclomatic 35) · ×1
  • signup-options.SignupOptions (cyclomatic 35) apps/admin/src/settings/membership/portal/signup-options.tsx:44 — signup-options.SignupOptions has cyclomatic complexity 35 (threshold 15). Of this number, 18 points are the body's own statements and 17 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tiers.Tiers (cyclomatic 35) · ×1
  • tiers.Tiers (cyclomatic 35) apps/admin/src/settings/membership/tiers.tsx:72 — tiers.Tiers has cyclomatic complexity 35 (threshold 15). Of this number, 26 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · locale-validation.validateLocale (cyclomatic 35) · ×1
  • locale-validation.validateLocale (cyclomatic 35) apps/admin/src/settings/utils/locale-validation.ts:46 — locale-validation.validateLocale has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gift-redemption-page.GiftRedemptionPage (cyclomatic 35) · ×1
  • gift-redemption-page.GiftRedemptionPage (cyclomatic 35) apps/portal/src/components/pages/gift-redemption-page.jsx:58 — gift-redemption-page.GiftRedemptionPage has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PostsStatsService.getTopPostsViews (cyclomatic 35) · ×1
  • PostsStatsService.getTopPostsViews (cyclomatic 35) ghost/core/core/server/services/stats/posts-stats-service.js:1256 — PostsStatsService.getTopPostsViews has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1450, 1341, 1318, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · unblock-dialog.UnblockDialog (cyclomatic 34) · ×1
  • unblock-dialog.UnblockDialog (cyclomatic 34) apps/activitypub/src/views/profile/components/unblock-dialog.tsx:31 — unblock-dialog.UnblockDialog has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 43, 69, 152, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · locations-card.LocationsCard (cyclomatic 34) · ×1
  • locations-card.LocationsCard (cyclomatic 34) apps/admin/src/analytics/views/stats/locations/components/locations-card.tsx:96 — locations-card.LocationsCard has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 6 of the 34 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 298, 110, 152, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · top-level-group.TopLevelGroup (cyclomatic 34) · ×1
  • top-level-group.TopLevelGroup (cyclomatic 34) apps/admin/src/settings/components/top-level-group.tsx:40 — top-level-group.TopLevelGroup has cyclomatic complexity 34 (threshold 15). Of this number, 25 points are the body's own statements and 9 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · unsubscribe-page.UnsubscribePage (cyclomatic 34) · ×1
  • unsubscribe-page.UnsubscribePage (cyclomatic 34) apps/portal/src/components/pages/unsubscribe-page.jsx:83 — unsubscribe-page.UnsubscribePage has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 9 of the 34 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 200, 316, 105, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · posts-list-screen.PostsListScreen (cyclomatic 33) · ×1
  • posts-list-screen.PostsListScreen (cyclomatic 33) apps/admin/src/posts/list/posts-list-screen.tsx:61 — posts-list-screen.PostsListScreen has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · edit-retention-offer-modal.RetentionOfferSidebar (cyclomatic 33) · ×1
  • edit-retention-offer-modal.RetentionOfferSidebar (cyclomatic 33) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:253 — edit-retention-offer-modal.RetentionOfferSidebar has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · check-internal-packages.validateCompliantPackage (cyclomatic 33) · ×1
  • check-internal-packages.validateCompliantPackage (cyclomatic 33) scripts/check-internal-packages.js:193 — check-internal-packages.validateCompliantPackage has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-post-selection.usePostSelection (cyclomatic 32) · ×1
  • use-post-selection.usePostSelection (cyclomatic 32) apps/admin/src/posts/list/hooks/use-post-selection.ts:46 — use-post-selection.usePostSelection has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 86, 181, 212, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-editor-session.useEditorSession (cyclomatic 32) · ×1
  • use-editor-session.useEditorSession (cyclomatic 32) apps/admin/src/editor/session/use-editor-session.ts:164 — use-editor-session.useEditorSession has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 323, 311, 378, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · actions.default (cyclomatic 32) · ×1
  • actions.default (cyclomatic 32) ghost/core/core/server/models/base/plugins/actions.js:12 — actions.default has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · growth-kpis.GrowthKPIs (cyclomatic 31) · ×1
  • growth-kpis.GrowthKPIs (cyclomatic 31) apps/admin/src/analytics/views/stats/growth/components/growth-kpis.tsx:158 — growth-kpis.GrowthKPIs has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · use-post-bulk-actions.usePostBulkActions (cyclomatic 31) · ×1
  • use-post-bulk-actions.usePostBulkActions (cyclomatic 31) apps/admin/src/posts/list/hooks/use-post-bulk-actions.ts:142 — use-post-bulk-actions.usePostBulkActions has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 295, 368, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · invite-user-modal.InviteUserModal (cyclomatic 31) · ×1
  • invite-user-modal.InviteUserModal (cyclomatic 31) apps/admin/src/settings/general/invite-user-modal.tsx:30 — invite-user-modal.InviteUserModal has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 96, 60, 209, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · tier-detail-preview.TierDetailPreview (cyclomatic 31) · ×1
  • tier-detail-preview.TierDetailPreview (cyclomatic 31) apps/admin/src/settings/membership/tiers/tier-detail-preview.tsx:81 — tier-detail-preview.TierDetailPreview has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · get-portal-preview-url.getPortalPreviewUrl (cyclomatic 31) · ×1
  • get-portal-preview-url.getPortalPreviewUrl (cyclomatic 31) apps/admin/src/settings/utils/get-portal-preview-url.ts:19 — get-portal-preview-url.getPortalPreviewUrl has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · paid-account-actions.PaidAccountActions (cyclomatic 31) · ×1
  • paid-account-actions.PaidAccountActions (cyclomatic 31) apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.jsx:21 — paid-account-actions.PaidAccountActions has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 38, 109, 183, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · chart.ChartTooltipContent (cyclomatic 31) · ×1
  • chart.ChartTooltipContent (cyclomatic 31) REDACTED:108 — chart.ChartTooltipContent has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 170, 128). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EmailRenderer.renderBody (cyclomatic 31) · ×1
  • EmailRenderer.renderBody (cyclomatic 31) ghost/core/core/server/services/email-service/email-renderer.js:572 — EmailRenderer.renderBody has cyclomatic complexity 31 (threshold 15). Of this number, 20 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tier-checkout-collection.TierCheckoutCollection (cyclomatic 30) · ×1
  • tier-checkout-collection.TierCheckoutCollection (cyclomatic 30) apps/admin/src/settings/membership/tiers/tier-checkout-collection.tsx:278 — tier-checkout-collection.TierCheckoutCollection has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 381, 320, 326, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · publication-language.PublicationLanguage (cyclomatic 30) · ×1
  • publication-language.PublicationLanguage (cyclomatic 30) apps/admin/src/settings/general/publication-language.tsx:33 — publication-language.PublicationLanguage has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · multi-select-combobox.MultiSelectCombobox (cyclomatic 30) · ×1
  • multi-select-combobox.MultiSelectCombobox (cyclomatic 30) apps/shade/src/components/ui/multi-select-combobox.tsx:171 — multi-select-combobox.MultiSelectCombobox has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 262, 290, 225, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · UnsplashSearchModal.UnsplashSearchModal (cyclomatic 30) · ×1
  • UnsplashSearchModal.UnsplashSearchModal (cyclomatic 30) koenig/kg-unsplash-selector/src/UnsplashSearchModal.tsx:18 — UnsplashSearchModal.UnsplashSearchModal has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 83, 110, 45, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-activity-pub-queries.useDeleteMutationForUser (cyclomatic 29) · ×1
  • use-activity-pub-queries.useDeleteMutationForUser (cyclomatic 29) apps/activitypub/src/hooks/use-activity-pub-queries.ts:2165 — use-activity-pub-queries.useDeleteMutationForUser has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 2175, 2494, 2428, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-post-newsletter-stats.usePostNewsletterStats (cyclomatic 29) · ×1
  • use-post-newsletter-stats.usePostNewsletterStats (cyclomatic 29) apps/admin/src/posts/analytics/hooks/use-post-newsletter-stats.ts:19 — use-post-newsletter-stats.usePostNewsletterStats has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 40, 64, 159, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · App.fetchOfferQueryStrData (cyclomatic 29) · ×1
  • App.fetchOfferQueryStrData (cyclomatic 29) REDACTED:434 — App.fetchOfferQueryStrData has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · clean.post (cyclomatic 29) · ×1
  • clean.post (cyclomatic 29) ghost/core/core/server/api/endpoints/utils/serializers/output/utils/clean.js:81 — clean.post has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsImporter.beforeImport (cyclomatic 29) · ×1
  • SettingsImporter.beforeImport (cyclomatic 29) ghost/core/core/server/data/importer/importers/data/settings-importer.js:99 — SettingsImporter.beforeImport has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 226, 169, 147, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · handleSubscriptionEvent (cyclomatic 29) · ×1
  • handleSubscriptionEvent (cyclomatic 29) ghost/core/core/server/services/stripe/services/webhook/checkout-session-event-service.js:330 — handleSubscriptionEvent has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · newsletters.Newsletters (cyclomatic 28) · ×1
  • newsletters.Newsletters (cyclomatic 28) apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx:287 — newsletters.Newsletters has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 342, 368, 334, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · post-list-row.PostListRowComponent (cyclomatic 28) · ×1
  • post-list-row.PostListRowComponent (cyclomatic 28) apps/admin/src/posts/list/components/post-list-row.tsx:124 — post-list-row.PostListRowComponent has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · members-actions.MembersActions (cyclomatic 28) · ×1
  • members-actions.MembersActions (cyclomatic 28) apps/admin/src/members/components/members-actions.tsx:40 — members-actions.MembersActions has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 136, 86, 111, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · member-event.getIcon (cyclomatic 28) · ×1
  • member-event.getIcon (cyclomatic 28) apps/admin/src/members/detail/member-event.ts:125 — member-event.getIcon has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · activity-email-preview.ActivityEmailPreview (cyclomatic 28) · ×1
  • activity-email-preview.ActivityEmailPreview (cyclomatic 28) apps/admin/src/members/activity/activity-email-preview.tsx:31 — activity-email-preview.ActivityEmailPreview has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · universal-import-modal.UniversalImportModal (cyclomatic 28) · ×1
  • universal-import-modal.UniversalImportModal (cyclomatic 28) apps/admin/src/settings/advanced/migration-tools/universal-import-modal.tsx:23 — universal-import-modal.UniversalImportModal has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 52, 108, 37, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · welcome-email-modal.WelcomeEmailModal (cyclomatic 28) · ×1
  • welcome-email-modal.WelcomeEmailModal (cyclomatic 28) apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:113 — welcome-email-modal.WelcomeEmailModal has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ParseMemberEventHelper.getIcon (cyclomatic 28) · ×1
  • ParseMemberEventHelper.getIcon (cyclomatic 28) apps/ember-admin/app/helpers/parse-member-event.js:70 — ParseMemberEventHelper.getIcon has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · date-picker.DatePicker (cyclomatic 28) · ×1
  • date-picker.DatePicker (cyclomatic 28) apps/portal/src/components/common/date-picker.jsx:296 — date-picker.DatePicker has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 346, 383, 392, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · filters.FilterInput (cyclomatic 28) · ×1
  • filters.FilterInput (cyclomatic 28) apps/shade/src/components/patterns/filters.tsx:545 — filters.FilterInput has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 602, 577, 637, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · route-settings-parser.serializeRouteSettings (cyclomatic 28) · ×1
  • route-settings-parser.serializeRouteSettings (cyclomatic 28) ghost/core/core/server/services/route-settings/route-settings-parser.ts:501 — route-settings-parser.serializeRouteSettings has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · navigation.navigation (cyclomatic 28) · ×1
  • navigation.navigation (cyclomatic 28) ghost/core/core/frontend/helpers/navigation.js:98 — navigation.navigation has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · member-activity-pagination.loadMemberActivityPage (cyclomatic 27) · ×1
  • member-activity-pagination.loadMemberActivityPage (cyclomatic 27) apps/admin-x-framework/src/api/member-activity-pagination.ts:71 — member-activity-pagination.loadMemberActivityPage has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editor-screen.EditorLoader (cyclomatic 27) · ×1
  • editor-screen.EditorLoader (cyclomatic 27) apps/admin/src/editor/editor-screen.tsx:325 — editor-screen.EditorLoader has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · edit-offer-modal.Sidebar (cyclomatic 27) · ×1
  • edit-offer-modal.Sidebar (cyclomatic 27) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:53 — edit-offer-modal.Sidebar has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · edit-offer-modal.EditOfferModal (cyclomatic 27) · ×1
  • edit-offer-modal.EditOfferModal (cyclomatic 27) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:281 — edit-offer-modal.EditOfferModal has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 345, 393, 308). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · preview-frame.EmailPreviewFrame (cyclomatic 27) · ×1
  • preview-frame.EmailPreviewFrame (cyclomatic 27) apps/admin/src/automations/components/email-modal/preview-frame.tsx:10 — preview-frame.EmailPreviewFrame has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-post-success-modal.usePostSuccessModal (cyclomatic 27) · ×1
  • use-post-success-modal.usePostSuccessModal (cyclomatic 27) apps/admin/src/posts/analytics/hooks/use-post-success-modal.ts:20 — use-post-success-modal.usePostSuccessModal has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 68, 77, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · default-recipients.DefaultRecipients (cyclomatic 27) · ×1
  • default-recipients.DefaultRecipients (cyclomatic 27) apps/admin/src/settings/email/default-recipients.tsx:83 — default-recipients.DefaultRecipients has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 148, 174, 194, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · welcome-email-preview-frame.WelcomeEmailPreviewFrame (cyclomatic 27) · ×1
  • welcome-email-preview-frame.WelcomeEmailPreviewFrame (cyclomatic 27) apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:10 — welcome-email-preview-frame.WelcomeEmailPreviewFrame has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · App.getPageFromLinkPath (cyclomatic 27) · ×1
  • App.getPageFromLinkPath (cyclomatic 27) REDACTED:1169 — App.getPageFromLinkPath has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · members-api.MembersAPI (cyclomatic 27) · ×1
  • members-api.MembersAPI (cyclomatic 27) ghost/core/core/server/services/members/members-api/members-api.js:25 — members-api.MembersAPI has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · body_class.body_class (cyclomatic 27) · ×1
  • body_class.body_class (cyclomatic 27) ghost/core/core/frontend/helpers/body_class.js:19 — body_class.body_class has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · get.get (cyclomatic 27) · ×1
  • get.get (cyclomatic 27) ghost/core/core/frontend/helpers/get.js:405 — get.get has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · handle-image-sizes.handleImageSizes (cyclomatic 27) · ×1
  • handle-image-sizes.handleImageSizes (cyclomatic 27) ghost/core/core/frontend/web/middleware/handle-image-sizes.js:16 — handle-image-sizes.handleImageSizes has cyclomatic complexity 27 (threshold 15). Of this number, 15 points are the body's own statements and 12 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · handleDataAttributes (cyclomatic 27) · ×1
  • handleDataAttributes (cyclomatic 27) apps/portal/src/data-attributes.js:227 — handleDataAttributes has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 33 function items inside it that branch ((anonymous), (anonymous)::clickHandler, (anonymous)::clickHandler, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · suggested-profiles.SuggestedProfiles (cyclomatic 26) · ×1
  • suggested-profiles.SuggestedProfiles (cyclomatic 26) apps/activitypub/src/views/feed/components/suggested-profiles.tsx:12 — suggested-profiles.SuggestedProfiles has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 130, 25, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · bluesky-sharing.BlueskySharing (cyclomatic 26) · ×1
  • bluesky-sharing.BlueskySharing (cyclomatic 26) apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:35 — bluesky-sharing.BlueskySharing has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-growth-stats.calculateTotals (cyclomatic 26) · ×1
  • use-growth-stats.calculateTotals (cyclomatic 26) apps/admin/src/analytics/hooks/use-growth-stats.ts:18 — use-growth-stats.calculateTotals has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · email-recipients-options.EmailRecipientsOptions (cyclomatic 26) · ×1
  • email-recipients-options.EmailRecipientsOptions (cyclomatic 26) apps/admin/src/editor/publish/components/email-recipients-options.tsx:36 — email-recipients-options.EmailRecipientsOptions has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 109, 93, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · unsubscribe-modal.UnsubscribeModal (cyclomatic 26) · ×1
  • unsubscribe-modal.UnsubscribeModal (cyclomatic 26) apps/admin/src/members/components/bulk-action-modals/unsubscribe-modal.tsx:30 — unsubscribe-modal.UnsubscribeModal has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 9 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · member-value-semantics.subscriptionSemantics (cyclomatic 26) · ×1
  • member-value-semantics.subscriptionSemantics (cyclomatic 26) apps/admin/src/members/member-value-semantics.ts:12 — member-value-semantics.subscriptionSemantics has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · theme-modal.ChangeThemeModal (cyclomatic 26) · ×1
  • theme-modal.ChangeThemeModal (cyclomatic 26) apps/admin/src/settings/site/theme-modal.tsx:317 — theme-modal.ChangeThemeModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 345, 392, 490, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mapping-step.MappingStep (cyclomatic 26) · ×1
  • mapping-step.MappingStep (cyclomatic 26) apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:46 — mapping-step.MappingStep has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · preview-modal.PreviewModalContent (cyclomatic 26) · ×1
  • preview-modal.PreviewModalContent (cyclomatic 26) apps/admin/src/settings/components/preview-modal.tsx:91 — preview-modal.PreviewModalContent has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · form.FormEditor (cyclomatic 26) · ×1
  • form.FormEditor (cyclomatic 26) apps/comments-ui/src/components/content/forms/form.tsx:27 — form.FormEditor has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 110, 80, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gift-success-page.GiftSuccessPage (cyclomatic 26) · ×1
  • gift-success-page.GiftSuccessPage (cyclomatic 26) apps/portal/src/components/pages/gift-success-page.jsx:139 — gift-success-page.GiftSuccessPage has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · commands.addTableColumn (cyclomatic 26) · ×1
  • commands.addTableColumn (cyclomatic 26) ghost/core/core/server/data/schema/commands.js:22 — commands.addTableColumn has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Offer.create (cyclomatic 26) · ×1
  • Offer.create (cyclomatic 26) ghost/core/core/server/services/offers/domain/models/offer.js:288 — Offer.create has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · middleware.createSessionFromMagicLink (cyclomatic 26) · ×1
  • middleware.createSessionFromMagicLink (cyclomatic 26) ghost/core/core/server/services/members/middleware.js:415 — middleware.createSessionFromMagicLink has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OEmbedService.fetchOembedDataFromUrl (cyclomatic 26) · ×1
  • OEmbedService.fetchOembedDataFromUrl (cyclomatic 26) ghost/core/core/server/services/oembed/oembed-service.js:755 — OEmbedService.fetchOembedDataFromUrl has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · new-subscribers-cadence.NewSubscribersCadence (cyclomatic 25) · ×1
  • new-subscribers-cadence.NewSubscribersCadence (cyclomatic 25) apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:65 — new-subscribers-cadence.NewSubscribersCadence has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 345, 113, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · embed-signup-sidebar.EmbedSignupSidebar (cyclomatic 25) · ×1
  • embed-signup-sidebar.EmbedSignupSidebar (cyclomatic 25) apps/admin/src/settings/growth/embed-signup/embed-signup-sidebar.tsx:45 — embed-signup-sidebar.EmbedSignupSidebar has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 73, 208, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · platform-validator.createPlatformValidator (cyclomatic 25) · ×1
  • platform-validator.createPlatformValidator (cyclomatic 25) apps/admin/src/settings/utils/social-urls/platform-validator.ts:153 — platform-validator.createPlatformValidator has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 234, 211, 284, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · email-design.getEmailDesign (cyclomatic 25) · ×1
  • email-design.getEmailDesign (cyclomatic 25) ghost/core/core/server/services/email-rendering/email-design.js:71 — email-design.getEmailDesign has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GiftDeliveryService.send (cyclomatic 25) · ×1
  • GiftDeliveryService.send (cyclomatic 25) ghost/core/core/server/services/gifts/gift-delivery-service.ts:229 — GiftDeliveryService.send has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ghost_head.getAdminToolbarHelper (cyclomatic 25) · ×1
  • ghost_head.getAdminToolbarHelper (cyclomatic 25) ghost/core/core/frontend/helpers/ghost_head.js:234 — ghost_head.getAdminToolbarHelper has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MembersStripeCustomersSubscriptionsImporter.generate (cyclomatic 25) · ×1
  • MembersStripeCustomersSubscriptionsImporter.generate (cyclomatic 25) ghost/core/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js:100 — MembersStripeCustomersSubscriptionsImporter.generate has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fetch-api.useFetchApi (cyclomatic 24) · ×1
  • fetch-api.useFetchApi (cyclomatic 24) apps/admin-x-framework/src/utils/api/fetch-api.ts:161 — fetch-api.useFetchApi has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 167, 211, 245). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · comment-likes-modal.CommentLikesModal (cyclomatic 24) · ×1
  • comment-likes-modal.CommentLikesModal (cyclomatic 24) REDACTED:33 — comment-likes-modal.CommentLikesModal has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-member-filter-fields.useMemberFilterFields (cyclomatic 24) · ×1
  • use-member-filter-fields.useMemberFilterFields (cyclomatic 24) apps/admin/src/members/use-member-filter-fields.ts:280 — use-member-filter-fields.useMemberFilterFields has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 316, 508, 380, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-pintura-editor.usePinturaEditor (cyclomatic 24) · ×1
  • use-pintura-editor.usePinturaEditor (cyclomatic 24) apps/admin/src/settings/hooks/use-pintura-editor.ts:49 — use-pintura-editor.usePinturaEditor has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 66, 108, 147, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · member-emails.MemberEmails (cyclomatic 24) · ×1
  • member-emails.MemberEmails (cyclomatic 24) apps/admin/src/settings/membership/member-emails.tsx:171 — member-emails.MemberEmails has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 272, 227, 300, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · date.dateSemantics (cyclomatic 24) · ×1
  • date.dateSemantics (cyclomatic 24) apps/admin/src/shared/filters/semantics/date.ts:107 — date.dateSemantics has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-scroll-restoration.useScrollRestoration (cyclomatic 24) · ×1
  • use-scroll-restoration.useScrollRestoration (cyclomatic 24) apps/admin/src/shared/virtual-list/use-scroll-restoration.tsx:116 — use-scroll-restoration.useScrollRestoration has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 242, 280, 197, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-attributes.formSubmitHandler (cyclomatic 24) · ×1
  • data-attributes.formSubmitHandler (cyclomatic 24) apps/portal/src/data-attributes.js:18 — data-attributes.formSubmitHandler has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · validator.validateSchema (cyclomatic 24) · ×1
  • validator.validateSchema (cyclomatic 24) ghost/core/core/server/data/schema/validator.ts:43 — validator.validateSchema has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 49). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · permissible (cyclomatic 24) · ×1
  • permissible (cyclomatic 24) ghost/core/core/server/models/post.js:1523 — permissible has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · createCheckoutSession (cyclomatic 24) · ×1
  • createCheckoutSession (cyclomatic 24) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:759 — createCheckoutSession has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · top-posts.TopPosts (cyclomatic 23) · ×1
  • top-posts.TopPosts (cyclomatic 23) apps/admin/src/analytics/views/stats/overview/components/top-posts.tsx:79 — top-posts.TopPosts has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 112, 252, 120). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-growth-stats.useGrowthStats (cyclomatic 23) · ×1
  • use-growth-stats.useGrowthStats (cyclomatic 23) apps/admin/src/analytics/hooks/use-growth-stats.ts:223 — use-growth-stats.useGrowthStats has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 289, 250, 389, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · newsletter-overview.NewsletterOverview (cyclomatic 23) · ×1
  • newsletter-overview.NewsletterOverview (cyclomatic 23) apps/admin/src/posts/analytics/overview/components/newsletter-overview.tsx:41 — newsletter-overview.NewsletterOverview has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · options-step.OptionsStep (cyclomatic 23) · ×1
  • options-step.OptionsStep (cyclomatic 23) apps/admin/src/editor/publish/components/options-step.tsx:79 — options-step.OptionsStep has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · design-modal.DesignModal (cyclomatic 23) · ×1
  • design-modal.DesignModal (cyclomatic 23) apps/admin/src/settings/site/design-modal.tsx:80 — design-modal.DesignModal has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 162, 174, 110, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-pintura-editor.usePinturaEditor (cyclomatic 23) · ×1
  • use-pintura-editor.usePinturaEditor (cyclomatic 23) apps/admin/src/hooks/use-pintura-editor.ts:11 — use-pintura-editor.usePinturaEditor has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 64, 19, 42, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-label-picker.useLabelPicker (cyclomatic 23) · ×1
  • use-label-picker.useLabelPicker (cyclomatic 23) apps/admin/src/members/hooks/use-label-picker.ts:36 — use-label-picker.useLabelPicker has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 111, 151, 171, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · share-modal.ShareModal (cyclomatic 23) · ×1
  • share-modal.ShareModal (cyclomatic 23) apps/portal/src/components/pages/share/share-modal.jsx:16 — share-modal.ShareModal has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pagemenu.PageMenu (cyclomatic 23) · ×1
  • pagemenu.PageMenu (cyclomatic 23) apps/shade/src/components/ui/pagemenu.tsx:29 — pagemenu.PageMenu has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 45, 38, 100, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · database-automations-repository.createDatabaseAutomationsRepository (cyclomatic 23) · ×1
  • database-automations-repository.createDatabaseAutomationsRepository (cyclomatic 23) ghost/core/core/server/services/automations/database-automations-repository.ts:156 — database-automations-repository.createDatabaseAutomationsRepository has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 333, 397, 227, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MemberWelcomeEmailRenderer.render (cyclomatic 23) · ×1
  • MemberWelcomeEmailRenderer.render (cyclomatic 23) ghost/core/core/server/services/member-welcome-emails/member-welcome-email-renderer.js:128 — MemberWelcomeEmailRenderer.render has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · route-settings-parser.parseRouteSettings (cyclomatic 23) · ×1
  • route-settings-parser.parseRouteSettings (cyclomatic 23) ghost/core/core/server/services/route-settings/route-settings-parser.ts:389 — route-settings-parser.parseRouteSettings has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-activity-pub-queries.useReplyChainForUser (cyclomatic 22) · ×1
  • use-activity-pub-queries.useReplyChainForUser (cyclomatic 22) apps/activitypub/src/hooks/use-activity-pub-queries.ts:2551 — use-activity-pub-queries.useReplyChainForUser has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 2590, 2618, 2648, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · moderation.Moderation (cyclomatic 22) · ×1
  • moderation.Moderation (cyclomatic 22) apps/activitypub/src/views/preferences/components/moderation.tsx:41 — moderation.Moderation has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 181, 266, 77). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gift-link-modal.GiftLinkModal (cyclomatic 22) · ×1
  • gift-link-modal.GiftLinkModal (cyclomatic 22) apps/admin/src/posts/analytics/modals/gift-link-modal.tsx:44 — gift-link-modal.GiftLinkModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 74, 127, 143, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · email-confirmation.createEmailConfirmation (cyclomatic 22) · ×1
  • email-confirmation.createEmailConfirmation (cyclomatic 22) apps/admin/src/editor/publish/email-confirmation.ts:56 — email-confirmation.createEmailConfirmation has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · comments-list.CommentsList (cyclomatic 22) · ×1
  • comments-list.CommentsList (cyclomatic 22) apps/admin/src/comments/components/comments-list.tsx:43 — comments-list.CommentsList has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 127, 88, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · add-recommendation-modal.AddRecommendationModal (cyclomatic 22) · ×1
  • add-recommendation-modal.AddRecommendationModal (cyclomatic 22) apps/admin/src/settings/growth/recommendations/add-recommendation-modal.tsx:44 — add-recommendation-modal.AddRecommendationModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 130, 74, 156, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · yaml-file-editor-modal.YamlFileEditorModal (cyclomatic 22) · ×1
  • yaml-file-editor-modal.YamlFileEditorModal (cyclomatic 22) apps/admin/src/settings/advanced/labs/yaml-file-editor-modal.tsx:34 — yaml-file-editor-modal.YamlFileEditorModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 61, 95, 119). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · color-picker-field.ColorPickerField (cyclomatic 22) · ×1
  • color-picker-field.ColorPickerField (cyclomatic 22) apps/admin/src/settings/components/color-picker-field.tsx:63 — color-picker-field.ColorPickerField has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 85, 91, 146, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · members.mockMembers (cyclomatic 22) · ×1
  • members.mockMembers (cyclomatic 22) apps/ember-admin/mirage/config/members.js:75 — members.mockMembers has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 81, 149, 278, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ProductRepository.create (cyclomatic 22) · ×1
  • ProductRepository.create (cyclomatic 22) ghost/core/core/server/services/members/members-api/repositories/product-repository.js:174 — ProductRepository.create has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NewslettersService.prepAttrsForEmailVerification (cyclomatic 22) · ×1
  • NewslettersService.prepAttrsForEmailVerification (cyclomatic 22) ghost/core/core/server/services/newsletters/newsletters-service.js:289 — NewslettersService.prepAttrsForEmailVerification has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EmailAnalyticsService.#fetchEventsForJob (cyclomatic 22) · ×1
  • EmailAnalyticsService.#fetchEventsForJob (cyclomatic 22) ghost/core/core/server/services/email-analytics/email-analytics-service.ts:447 — EmailAnalyticsService.#fetchEventsForJob has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tinybird.create (cyclomatic 22) · ×1
  • tinybird.create (cyclomatic 22) ghost/core/core/server/services/stats/utils/tinybird.js:12 — tinybird.create has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 25, 113, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MppAdapter.#run (cyclomatic 22) · ×1
  • MppAdapter.#run (cyclomatic 22) ghost/core/core/server/services/machine-payments/adapters/mpp-adapter.ts:141 — MppAdapter.#run has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AutomationRunStepsImporter.import (cyclomatic 22) · ×1
  • AutomationRunStepsImporter.import (cyclomatic 22) ghost/core/core/server/data/seeders/importers/automation-run-steps-importer.ts:55 — AutomationRunStepsImporter.import has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · video.handleVideoPlayer (cyclomatic 22) · ×1
  • video.handleVideoPlayer (cyclomatic 22) ghost/core/core/frontend/src/cards/js/video.js:2 — video.handleVideoPlayer has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 143, 131, 109, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · applyOfferToSubscription (cyclomatic 22) · ×1
  • applyOfferToSubscription (cyclomatic 22) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:2224 — applyOfferToSubscription has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · add (cyclomatic 22) · ×1
  • add (cyclomatic 22) ghost/core/core/server/services/members/members-api/services/member-bread-service.js:470 — add has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · handle-response.handleResponse (cyclomatic 21) · ×1
  • handle-response.handleResponse (cyclomatic 21) apps/admin-x-framework/src/utils/api/handle-response.ts:26 — handle-response.handleResponse has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · actions.getLinkTarget (cyclomatic 21) · ×1
  • actions.getLinkTarget (cyclomatic 21) apps/admin-x-framework/src/api/actions.ts:130 — actions.getLinkTarget has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · web.Web (cyclomatic 21) · ×1
  • web.Web (cyclomatic 21) apps/admin/src/analytics/views/stats/web/web.tsx:26 — web.Web has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 64, 52, 103, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · growth-sources.GrowthSources (cyclomatic 21) · ×1
  • growth-sources.GrowthSources (cyclomatic 21) apps/admin/src/analytics/views/stats/growth/components/growth-sources.tsx:111 — growth-sources.GrowthSources has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · newsletter-radial-chart.NewsletterRadialChart (cyclomatic 21) · ×1
  • newsletter-radial-chart.NewsletterRadialChart (cyclomatic 21) apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:26 — newsletter-radial-chart.NewsletterRadialChart has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 47, 139, 35). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · theme-file-tree.ThemeFileTree (cyclomatic 21) · ×1
  • theme-file-tree.ThemeFileTree (cyclomatic 21) apps/admin/src/settings/site/theme/theme-file-tree.tsx:100 — theme-file-tree.ThemeFileTree has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 113, 151, 178). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · history-modal.HistoryFilter (cyclomatic 21) · ×1
  • history-modal.HistoryFilter (cyclomatic 21) apps/admin/src/settings/advanced/history-modal.tsx:99 — history-modal.HistoryFilter has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 116, 133, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · history-modal.HistoryModal (cyclomatic 21) · ×1
  • history-modal.HistoryModal (cyclomatic 21) apps/admin/src/settings/advanced/history-modal.tsx:423 — history-modal.HistoryModal has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · webhook-modal.WebhookModal (cyclomatic 21) · ×1
  • webhook-modal.WebhookModal (cyclomatic 21) apps/admin/src/settings/advanced/integrations/webhook-modal.tsx:32 — webhook-modal.WebhookModal has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-unsaved-changes-guard.useUnsavedChangesGuard (cyclomatic 21) · ×1
  • use-unsaved-changes-guard.useUnsavedChangesGuard (cyclomatic 21) apps/admin/src/hooks/use-unsaved-changes-guard.ts:65 — use-unsaved-changes-guard.useUnsavedChangesGuard has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 90, 129, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · email-sending-status-banner.EmailSendingStatusBanner (cyclomatic 21) · ×1
  • email-sending-status-banner.EmailSendingStatusBanner (cyclomatic 21) apps/admin/src/posts/analytics/email-sending-status/email-sending-status-banner.tsx:94 — email-sending-status-banner.EmailSendingStatusBanner has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · format-url.formatUrl (cyclomatic 21) · ×1
  • format-url.formatUrl (cyclomatic 21) apps/admin/src/settings/utils/format-url.ts:3 — format-url.formatUrl has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LexicalEditorController._hasDirtyAttributes (cyclomatic 21) · ×1
  • LexicalEditorController._hasDirtyAttributes (cyclomatic 21) REDACTED:1444 — LexicalEditorController._hasDirtyAttributes has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · recommendations-page.RecommendationItem (cyclomatic 21) · ×1
  • recommendations-page.RecommendationItem (cyclomatic 21) apps/portal/src/components/pages/recommendations-page.jsx:195 — recommendations-page.RecommendationItem has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · code-editor-view.CodeEditorView (cyclomatic 21) · ×1
  • code-editor-view.CodeEditorView (cyclomatic 21) apps/shade/src/components/ui/code-editor-view.tsx:54 — code-editor-view.CodeEditorView has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · post-data.buildPostData (cyclomatic 21) · ×1
  • post-data.buildPostData (cyclomatic 21) ghost/core/core/server/services/content-import/import/post-data.ts:82 — post-data.buildPostData has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · context.setResponseContext (cyclomatic 21) · ×1
  • context.setResponseContext (cyclomatic 21) ghost/core/core/frontend/services/rendering/context.js:19 — context.setResponseContext has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · generate-img-attrs.generateImgSrcAttrs (cyclomatic 21) · ×1
  • generate-img-attrs.generateImgSrcAttrs (cyclomatic 21) koenig/kg-default-cards/src/utils/generate-img-attrs.ts:64 — generate-img-attrs.generateImgSrcAttrs has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · #run (cyclomatic 21) · ×1
  • #run (cyclomatic 21) ghost/core/core/server/data/seeders/data-generator.js:242 — #run has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · feed-item-stats.FeedItemStats (cyclomatic 20) · ×1
  • feed-item-stats.FeedItemStats (cyclomatic 20) apps/activitypub/src/components/feed/feed-item-stats.tsx:28 — feed-item-stats.FeedItemStats has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-keyboard-shortcuts.useKeyboardShortcuts (cyclomatic 20) · ×1
  • use-keyboard-shortcuts.useKeyboardShortcuts (cyclomatic 20) apps/activitypub/src/hooks/use-keyboard-shortcuts.tsx:11 — use-keyboard-shortcuts.useKeyboardShortcuts has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 16). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · inbox-list.InboxList (cyclomatic 20) · ×1
  • inbox-list.InboxList (cyclomatic 20) apps/activitypub/src/views/inbox/components/inbox-list.tsx:34 — inbox-list.InboxList has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 59, 64, 105, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-koenig-file-upload.useKoenigFileUpload (cyclomatic 20) · ×1
  • use-koenig-file-upload.useKoenigFileUpload (cyclomatic 20) apps/admin-x-framework/src/hooks/use-koenig-file-upload.ts:94 — use-koenig-file-upload.useKoenigFileUpload has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 161, 124, 222, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · complete-step.CompleteStep (cyclomatic 20) · ×1
  • complete-step.CompleteStep (cyclomatic 20) apps/admin/src/editor/publish/components/complete-step.tsx:62 — complete-step.CompleteStep has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-post-snippets.usePostSnippets (cyclomatic 20) · ×1
  • use-post-snippets.usePostSnippets (cyclomatic 20) apps/admin/src/editor/use-post-snippets.tsx:36 — use-post-snippets.usePostSnippets has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 103, 43, 130, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · manage-view-popover.ManageViewPopoverContent (cyclomatic 20) · ×1
  • manage-view-popover.ManageViewPopoverContent (cyclomatic 20) apps/admin/src/members/components/manage-view-popover.tsx:21 — manage-view-popover.ManageViewPopoverContent has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · members-header-search.MembersHeaderSearch (cyclomatic 20) · ×1
  • members-header-search.MembersHeaderSearch (cyclomatic 20) apps/admin/src/members/components/members-header-search.tsx:16 — members-header-search.MembersHeaderSearch has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · member-detail-sidebar.MemberDetailSidebar (cyclomatic 20) · ×1
  • member-detail-sidebar.MemberDetailSidebar (cyclomatic 20) apps/admin/src/members/detail/member-detail-sidebar.tsx:45 — member-detail-sidebar.MemberDetailSidebar has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · user-detail-modal.UserDetailModal (cyclomatic 20) · ×1
  • user-detail-modal.UserDetailModal (cyclomatic 20) apps/admin/src/settings/general/user-detail-modal.tsx:671 — user-detail-modal.UserDetailModal has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · portal-modal.PortalModal (cyclomatic 20) · ×1
  • portal-modal.PortalModal (cyclomatic 20) apps/admin/src/settings/membership/portal/portal-modal.tsx:99 — portal-modal.PortalModal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 170, 121, 254, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sender-details.resolveEmailSenderDetails (cyclomatic 20) · ×1
  • sender-details.resolveEmailSenderDetails (cyclomatic 20) apps/admin/src/automations/components/email-modal/sender-details.ts:40 — sender-details.resolveEmailSenderDetails has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-gift-link-usage.useGiftLinkUsage (cyclomatic 20) · ×1
  • use-gift-link-usage.useGiftLinkUsage (cyclomatic 20) apps/admin/src/posts/analytics/hooks/use-gift-link-usage.ts:34 — use-gift-link-usage.useGiftLinkUsage has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-default-recipients-options.useDefaultRecipientsOptions (cyclomatic 20) · ×1
  • use-default-recipients-options.useDefaultRecipientsOptions (cyclomatic 20) apps/admin/src/settings/email/use-default-recipients-options.tsx:32 — use-default-recipients-options.useDefaultRecipientsOptions has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 104, 68, 152). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · users.Users (cyclomatic 20) · ×1
  • users.Users (cyclomatic 20) apps/admin/src/settings/general/users.tsx:311 — users.Users has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · welcome-email-sender-details.resolveWelcomeEmailSenderDetails (cyclomatic 20) · ×1
  • welcome-email-sender-details.resolveWelcomeEmailSenderDetails (cyclomatic 20) apps/admin/src/settings/utils/welcome-email-sender-details.ts:35 — welcome-email-sender-details.resolveWelcomeEmailSenderDetails has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · actions.updateCommentDislikeState (cyclomatic 20) · ×1
  • actions.updateCommentDislikeState (cyclomatic 20) apps/comments-ui/src/actions.ts:392 — actions.updateCommentDislikeState has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 420, 419, 408). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · main-form.MainForm (cyclomatic 20) · ×1
  • main-form.MainForm (cyclomatic 20) apps/comments-ui/src/components/content/forms/main-form.tsx:11 — main-form.MainForm has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 49, 15, 42, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · actions.updateProfile (cyclomatic 20) · ×1
  • actions.updateProfile (cyclomatic 20) apps/portal/src/actions.js:960 — actions.updateProfile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · search-index.isCJK (cyclomatic 20) · ×1
  • search-index.isCJK (cyclomatic 20) apps/sodo-search/src/search-index.js:14 — search-index.isCJK has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PostsService.bulkEdit (cyclomatic 20) · ×1
  • PostsService.bulkEdit (cyclomatic 20) ghost/core/core/server/services/posts/posts-service.js:120 — PostsService.bulkEdit has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EmailAddressService.getAddress (cyclomatic 20) · ×1
  • EmailAddressService.getAddress (cyclomatic 20) REDACTED:104 — EmailAddressService.getAddress has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GiftService.startCheckout (cyclomatic 20) · ×1
  • GiftService.startCheckout (cyclomatic 20) ghost/core/core/server/services/gifts/gift-service.ts:331 — GiftService.startCheckout has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StripeCoupon.create (cyclomatic 20) · ×1
  • StripeCoupon.create (cyclomatic 20) ghost/core/core/server/services/offers/domain/models/stripe-coupon.js:48 — StripeCoupon.create has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · api.createApiInstance (cyclomatic 20) · ×1
  • api.createApiInstance (cyclomatic 20) ghost/core/core/server/services/members/api.js:58 — api.createApiInstance has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PostMediaInliner.inlineLexicalChildren (cyclomatic 20) · ×1
  • PostMediaInliner.inlineLexicalChildren (cyclomatic 20) ghost/core/core/server/services/content-import/import/media.ts:195 — PostMediaInliner.inlineLexicalChildren has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · markdown.renderEntryMarkdown (cyclomatic 20) · ×1
  • markdown.renderEntryMarkdown (cyclomatic 20) ghost/core/core/frontend/services/llms/markdown.js:152 — markdown.renderEntryMarkdown has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · has.has (cyclomatic 20) · ×1
  • has.has (cyclomatic 20) ghost/core/core/frontend/helpers/has.js:129 — has.has has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 145, 148, 151, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DockerAnalyticsManager.generateSession (cyclomatic 20) · ×1
  • DockerAnalyticsManager.generateSession (cyclomatic 20) ghost/core/core/server/data/tinybird/scripts/docker-analytics-manager.js:555 — DockerAnalyticsManager.generateSession has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · clean-basic-html.cleanBasicHtml (cyclomatic 20) · ×1
  • clean-basic-html.cleanBasicHtml (cyclomatic 20) koenig/kg-clean-basic-html/src/clean-basic-html.ts:12 — clean-basic-html.cleanBasicHtml has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _getSubscriptionCheckoutData (cyclomatic 20) · ×1
  • _getSubscriptionCheckoutData (cyclomatic 20) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:422 — _getSubscriptionCheckoutData has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _createSubscriptionCheckoutSession (cyclomatic 20) · ×1
  • _createSubscriptionCheckoutSession (cyclomatic 20) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:547 — _createSubscriptionCheckoutSession has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extendModel · ×1
  • extendModel::permissible (cyclomatic 20) ghost/core/core/server/models/relations/authors.js:340 — extendModel::permissible has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-form.useForm (cyclomatic 19) · ×1
  • use-form.useForm (cyclomatic 19) apps/admin-x-framework/src/hooks/use-form.ts:51 — use-form.useForm has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 97, 74, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · editor-header-actions.PublishActions (cyclomatic 19) · ×1
  • editor-header-actions.PublishActions (cyclomatic 19) apps/admin/src/editor/editor-header-actions.tsx:172 — editor-header-actions.PublishActions has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · post-settings-sidebar.PostSettingsSidebar (cyclomatic 19) · ×1
  • post-settings-sidebar.PostSettingsSidebar (cyclomatic 19) apps/admin/src/editor/settings/post-settings-sidebar.tsx:111 — post-settings-sidebar.PostSettingsSidebar has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · addressing.customFieldAddressing (cyclomatic 19) · ×1
  • addressing.customFieldAddressing (cyclomatic 19) apps/admin/src/members/custom-fields/addressing.ts:84 — addressing.customFieldAddressing has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · activity-row.ActivityRow (cyclomatic 19) · ×1
  • activity-row.ActivityRow (cyclomatic 19) apps/admin/src/members/activity/activity-row.tsx:26 — activity-row.ActivityRow has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · portal-links.PortalLinks (cyclomatic 19) · ×1
  • portal-links.PortalLinks (cyclomatic 19) apps/admin/src/settings/membership/portal/portal-links.tsx:46 — portal-links.PortalLinks has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · history-modal.HistoryActionDescription (cyclomatic 19) · ×1
  • history-modal.HistoryActionDescription (cyclomatic 19) apps/admin/src/settings/advanced/history-modal.tsx:341 — history-modal.HistoryActionDescription has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · field-picker.FieldPicker (cyclomatic 19) · ×1
  • field-picker.FieldPicker (cyclomatic 19) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/field-picker.tsx:88 — field-picker.FieldPicker has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · post-list-row-email-status.PostListRowEmailStatus (cyclomatic 19) · ×1
  • post-list-row-email-status.PostListRowEmailStatus (cyclomatic 19) apps/admin/src/posts/list/components/post-list-row-email-status.tsx:22 — post-list-row-email-status.PostListRowEmailStatus has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · export-all-modal.ExportAllModal (cyclomatic 19) · ×1
  • export-all-modal.ExportAllModal (cyclomatic 19) apps/admin/src/settings/advanced/migration-tools/export-all-modal.tsx:80 — export-all-modal.ExportAllModal has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 117, 99, 95, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · custom-field-picker.CreateFieldInline (cyclomatic 19) · ×1
  • custom-field-picker.CreateFieldInline (cyclomatic 19) apps/admin/src/shared/member-custom-fields/custom-field-picker.tsx:215 — custom-field-picker.CreateFieldInline has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 236, 284). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · admin-api.setupAdminAPI (cyclomatic 19) · ×1
  • admin-api.setupAdminAPI (cyclomatic 19) apps/comments-ui/src/utils/admin-api.ts:1 — admin-api.setupAdminAPI has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · actions.updateCommentLikeState (cyclomatic 19) · ×1
  • actions.updateCommentLikeState (cyclomatic 19) apps/comments-ui/src/actions.ts:294 — actions.updateCommentLikeState has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 312, 311). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · KoenigLexicalEditor.ReactComponent (cyclomatic 19) · ×1
  • KoenigLexicalEditor.ReactComponent (cyclomatic 19) apps/ember-admin/app/components/koenig-lexical-editor.js:341 — KoenigLexicalEditor.ReactComponent has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 431, 484, 415, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MembersCountCacheService.countString (cyclomatic 19) · ×1
  • MembersCountCacheService.countString (cyclomatic 19) apps/ember-admin/app/services/members-count-cache.js:34 — MembersCountCacheService.countString has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · input-field.InputField (cyclomatic 19) · ×1
  • input-field.InputField (cyclomatic 19) apps/portal/src/components/common/input-field.jsx:179 — input-field.InputField has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan-step.GiftPlanStep (cyclomatic 19) · ×1
  • plan-step.GiftPlanStep (cyclomatic 19) apps/portal/src/components/pages/gift/plan-step.tsx:74 — plan-step.GiftPlanStep has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-share-data.gatherShareData (cyclomatic 19) · ×1
  • use-share-data.gatherShareData (cyclomatic 19) apps/portal/src/components/pages/share/use-share-data.js:44 — use-share-data.gatherShareData has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ContentCSVImporter.processRows (cyclomatic 19) · ×1
  • ContentCSVImporter.processRows (cyclomatic 19) ghost/core/core/server/services/content-import/import/importer.ts:239 — ContentCSVImporter.processRows has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · error-handler.themeErrorRenderer (cyclomatic 19) · ×1
  • error-handler.themeErrorRenderer (cyclomatic 19) ghost/core/core/frontend/web/middleware/error-handler.js:46 — error-handler.themeErrorRenderer has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlackPingService.ping (cyclomatic 19) · ×1
  • SlackPingService.ping (cyclomatic 19) ghost/core/core/server/services/slack-ping/slack-ping-service.ts:127 — SlackPingService.ping has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · onUpdated (cyclomatic 19) · ×1
  • onUpdated (cyclomatic 19) ghost/core/core/server/models/post.js:420 — onUpdated has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · getMemberOffers (cyclomatic 19) · ×1
  • getMemberOffers (cyclomatic 19) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:1212 — getMemberOffers has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createBatches (cyclomatic 19) · ×1
  • createBatches (cyclomatic 19) ghost/core/core/server/services/email-service/batch-sending-service.js:401 — createBatches has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · edit (cyclomatic 19) · ×1
  • edit (cyclomatic 19) ghost/core/core/server/services/members/members-api/services/member-bread-service.js:571 — edit has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ap-avatar.APAvatar (cyclomatic 18) · ×1
  • ap-avatar.APAvatar (cyclomatic 18) apps/activitypub/src/components/global/ap-avatar.tsx:83 — ap-avatar.APAvatar has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · recommendations.Recommendations (cyclomatic 18) · ×1
  • recommendations.Recommendations (cyclomatic 18) apps/activitypub/src/components/layout/sidebar/recommendations.tsx:13 — recommendations.Recommendations has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 38, 68). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · automations.spliceAction (cyclomatic 18) · ×1
  • automations.spliceAction (cyclomatic 18) apps/admin-x-framework/src/api/automations.ts:242 — automations.spliceAction has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · overview.Overview (cyclomatic 18) · ×1
  • overview.Overview (cyclomatic 18) apps/admin/src/analytics/views/stats/overview/overview.tsx:83 — overview.Overview has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 143, 198, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · growth-sources.GrowthSources (cyclomatic 18) · ×1
  • growth-sources.GrowthSources (cyclomatic 18) apps/admin/src/posts/analytics/growth/components/growth-sources.tsx:147 — growth-sources.GrowthSources has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · newsletter-filter-fields.newsletterAddressing (cyclomatic 18) · ×1
  • newsletter-filter-fields.newsletterAddressing (cyclomatic 18) apps/admin/src/members/newsletter-filter-fields.ts:54 — newsletter-filter-fields.newsletterAddressing has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · member-add-comp-modal.MemberAddCompModal (cyclomatic 18) · ×1
  • member-add-comp-modal.MemberAddCompModal (cyclomatic 18) apps/admin/src/members/detail/member-add-comp-modal.tsx:47 — member-add-comp-modal.MemberAddCompModal has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 84, 59, 75, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · theme-modal.ThemeToolbar (cyclomatic 18) · ×1
  • theme-modal.ThemeToolbar (cyclomatic 18) apps/admin/src/settings/site/theme-modal.tsx:68 — theme-modal.ThemeToolbar has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 160, 211, 87, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · navigation-item-editor.NavigationItemEditor (cyclomatic 18) · ×1
  • navigation-item-editor.NavigationItemEditor (cyclomatic 18) apps/admin/src/settings/site/navigation/navigation-item-editor.tsx:37 — navigation-item-editor.NavigationItemEditor has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · profile-tab.BasicInputs (cyclomatic 18) · ×1
  • profile-tab.BasicInputs (cyclomatic 18) apps/admin/src/settings/general/users/profile-tab.tsx:19 — profile-tab.BasicInputs has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · custom-integration-modal.CustomIntegrationModalContent (cyclomatic 18) · ×1
  • custom-integration-modal.CustomIntegrationModalContent (cyclomatic 18) apps/admin/src/settings/advanced/integrations/custom-integration-modal.tsx:30 — custom-integration-modal.CustomIntegrationModalContent has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 7 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · tag-image-field.TagImageField (cyclomatic 18) · ×1
  • tag-image-field.TagImageField (cyclomatic 18) apps/admin/src/tags/detail/tag-image-field.tsx:45 — tag-image-field.TagImageField has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tag-detail-form.TagDetailForm (cyclomatic 18) · ×1
  • tag-detail-form.TagDetailForm (cyclomatic 18) apps/admin/src/tags/detail/tag-detail-form.tsx:73 — tag-detail-form.TagDetailForm has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PostsRoute.model (cyclomatic 18) · ×1
  • PostsRoute.model (cyclomatic 18) apps/ember-admin/app/routes/posts.js:183 — PostsRoute.model has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · products-section.FreeProductCard (cyclomatic 18) · ×1
  • products-section.FreeProductCard (cyclomatic 18) apps/portal/src/components/common/products-section.jsx:688 — products-section.FreeProductCard has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · recommendations-page.RecommendationsPage (cyclomatic 18) · ×1
  • recommendations-page.RecommendationsPage (cyclomatic 18) apps/portal/src/components/pages/recommendations-page.jsx:324 — recommendations-page.RecommendationsPage has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · filters.FilterDatePicker (cyclomatic 18) · ×1
  • filters.FilterDatePicker (cyclomatic 18) apps/shade/src/components/patterns/filters.tsx:766 — filters.FilterDatePicker has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 824, 850, 795, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · CacheManager._doGet (cyclomatic 18) · ×1
  • CacheManager._doGet (cyclomatic 18) ghost/core/core/shared/settings-cache/cache-manager.js:121 — CacheManager._doGet has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · filter.createMetafieldsFilterTransformer (cyclomatic 18) · ×1
  • filter.createMetafieldsFilterTransformer (cyclomatic 18) ghost/core/core/server/services/members-metafields/filter.ts:100 — filter.createMetafieldsFilterTransformer has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostsExporter.filterToString (cyclomatic 18) · ×1
  • PostsExporter.filterToString (cyclomatic 18) ghost/core/core/server/services/posts/posts-exporter.js:389 — PostsExporter.filterToString has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReferrerTranslator.getReferrerDetails (cyclomatic 18) · ×1
  • ReferrerTranslator.getReferrerDetails (cyclomatic 18) ghost/core/core/server/services/member-attribution/referrer-translator.js:38 — ReferrerTranslator.getReferrerDetails has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · OEmbedService.fetchOembedData (cyclomatic 18) · ×1
  • OEmbedService.fetchOembedData (cyclomatic 18) ghost/core/core/server/services/oembed/oembed-service.js:666 — OEmbedService.fetchOembedData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · og-image.getOgImage (cyclomatic 18) · ×1
  • og-image.getOgImage (cyclomatic 18) ghost/core/core/frontend/meta/og-image.js:6 — og-image.getOgImage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · twitter-image.getTwitterImage (cyclomatic 18) · ×1
  • twitter-image.getTwitterImage (cyclomatic 18) ghost/core/core/frontend/meta/twitter-image.js:6 — twitter-image.getTwitterImage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pagination.pagination (cyclomatic 18) · ×1
  • pagination.pagination (cyclomatic 18) ghost/core/core/frontend/helpers/pagination.js:20 — pagination.pagination has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · poll.processStep (cyclomatic 18) · ×1
  • poll.processStep (cyclomatic 18) ghost/core/core/server/services/automations/poll.ts:129 — poll.processStep has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · lexical-to-mobiledoc.buildMarkers (cyclomatic 18) · ×1
  • lexical-to-mobiledoc.buildMarkers (cyclomatic 18) koenig/kg-converters/src/lexical-to-mobiledoc.ts:249 — lexical-to-mobiledoc.buildMarkers has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 262, 316, 270, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · #fetchEventsFromDomain (cyclomatic 18) · ×1
  • #fetchEventsFromDomain (cyclomatic 18) ghost/core/core/server/services/lib/mailgun-client.js:261 — #fetchEventsFromDomain has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-activity-pub-queries.useFollowMutationForUser (cyclomatic 17) · ×1
  • use-activity-pub-queries.useFollowMutationForUser (cyclomatic 17) apps/activitypub/src/hooks/use-activity-pub-queries.ts:1231 — use-activity-pub-queries.useFollowMutationForUser has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1288, 1417, 1251, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · account-migration.AccountMigration (cyclomatic 17) · ×1
  • account-migration.AccountMigration (cyclomatic 17) apps/activitypub/src/views/preferences/components/account-migration.tsx:63 — account-migration.AccountMigration has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · components.Toolbar (cyclomatic 17) · ×1
  • components.Toolbar (cyclomatic 17) apps/admin-toolbar/src/components.js:146 — components.Toolbar has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 170, 190, 210, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · members.membersCountString (cyclomatic 17) · ×1
  • members.membersCountString (cyclomatic 17) apps/admin-x-framework/src/api/members.ts:344 — members.membersCountString has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-limiter.useLimiter (cyclomatic 17) · ×1
  • use-limiter.useLimiter (cyclomatic 17) apps/admin-x-framework/src/hooks/use-limiter.ts:27 — use-limiter.useLimiter has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 51, 75, 43). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · nav-content.NavContent (cyclomatic 17) · ×1
  • nav-content.NavContent (cyclomatic 17) apps/admin/src/layout/app-sidebar/nav-content.tsx:78 — nav-content.NavContent has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-canvas-viewport.useCanvasViewport (cyclomatic 17) · ×1
  • use-canvas-viewport.useCanvasViewport (cyclomatic 17) apps/admin/src/automations/components/canvas/use-canvas-viewport.ts:57 — use-canvas-viewport.useCanvasViewport has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 119, 97, 83, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · nodes.NodeShell (cyclomatic 17) · ×1
  • nodes.NodeShell (cyclomatic 17) apps/admin/src/automations/components/canvas/nodes.tsx:92 — nodes.NodeShell has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · comments.CommentsPage (cyclomatic 17) · ×1
  • comments.CommentsPage (cyclomatic 17) apps/admin/src/comments/comments.tsx:25 — comments.CommentsPage has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · theme-setting.ThemeSetting (cyclomatic 17) · ×1
  • theme-setting.ThemeSetting (cyclomatic 17) apps/admin/src/settings/site/design-and-branding/theme-setting.tsx:35 — theme-setting.ThemeSetting has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · newsletter-detail-modal.NewsletterDetailModalContent (cyclomatic 17) · ×1
  • newsletter-detail-modal.NewsletterDetailModalContent (cyclomatic 17) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:1001 — newsletter-detail-modal.NewsletterDetailModalContent has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1040, 1024). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · offers-index.OffersIndexModal (cyclomatic 17) · ×1
  • offers-index.OffersIndexModal (cyclomatic 17) apps/admin/src/settings/growth/offers/offers-index.tsx:335 — offers-index.OffersIndexModal has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 363, 472, 350, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · label-picker.ComboboxPicker (cyclomatic 17) · ×1
  • label-picker.ComboboxPicker (cyclomatic 17) apps/admin/src/members/label-picker/label-picker.tsx:266 — label-picker.ComboboxPicker has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 325, 289, 316, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · emails.EmailsGroup (cyclomatic 17) · ×1
  • emails.EmailsGroup (cyclomatic 17) apps/admin/src/settings/email/emails.tsx:87 — emails.EmailsGroup has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 119, 108, 102). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · search.useSearchService (cyclomatic 17) · ×1
  • search.useSearchService (cyclomatic 17) apps/admin/src/settings/utils/search.tsx:22 — search.useSearchService has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 80, 108, 37, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · relative-date-filter.RelativeDateFilter (cyclomatic 17) · ×1
  • relative-date-filter.RelativeDateFilter (cyclomatic 17) apps/admin/src/shared/filters/relative-date-filter.tsx:27 — relative-date-filter.RelativeDateFilter has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · content.Content (cyclomatic 17) · ×1
  • content.Content (cyclomatic 17) apps/comments-ui/src/components/content/content.tsx:33 — content.Content has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GhKoenigEditorLexical.onTitleKeydown (cyclomatic 17) · ×1
  • GhKoenigEditorLexical.onTitleKeydown (cyclomatic 17) apps/ember-admin/app/components/gh-koenig-editor-lexical.js:116 — GhKoenigEditorLexical.onTitleKeydown has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ajaxService._makeRequest (cyclomatic 17) · ×1
  • ajaxService._makeRequest (cyclomatic 17) apps/ember-admin/app/services/ajax.js:253 — ajaxService._makeRequest has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ajaxService.handleResponse (cyclomatic 17) · ×1
  • ajaxService.handleResponse (cyclomatic 17) apps/ember-admin/app/services/ajax.js:331 — ajaxService.handleResponse has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · settings.validateNavigationItems (cyclomatic 17) · ×1
  • settings.validateNavigationItems (cyclomatic 17) ghost/core/core/server/api/endpoints/utils/validators/input/settings.js:68 — settings.validateNavigationItems has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 71). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Base.replaceIdentifiers (cyclomatic 17) · ×1
  • Base.replaceIdentifiers (cyclomatic 17) ghost/core/core/server/data/importer/importers/data/base.js:186 — Base.replaceIdentifiers has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 195, 187). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PostsImporter.beforeImport (cyclomatic 17) · ×1
  • PostsImporter.beforeImport (cyclomatic 17) ghost/core/core/server/data/importer/importers/data/posts-importer.js:247 — PostsImporter.beforeImport has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 253, 290, 321). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · post_class.post_class (cyclomatic 17) · ×1
  • post_class.post_class (cyclomatic 17) ghost/core/core/frontend/helpers/post_class.js:9 — post_class.post_class has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · serve-public-file.createPublicFileMiddleware (cyclomatic 17) · ×1
  • serve-public-file.createPublicFileMiddleware (cyclomatic 17) ghost/core/core/frontend/web/routers/serve-public-file.js:32 — serve-public-file.createPublicFileMiddleware has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 73, 46, 54). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · upload.mediaValidation (cyclomatic 17) · ×1
  • upload.mediaValidation (cyclomatic 17) ghost/core/core/server/web/api/middleware/upload.js:408 — upload.mediaValidation has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 409). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · middleware.tokenPermissionCheck (cyclomatic 17) · ×1
  • middleware.tokenPermissionCheck (cyclomatic 17) ghost/core/core/server/web/api/endpoints/admin/middleware.js:17 — middleware.tokenPermissionCheck has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · http.http (cyclomatic 17) · ×1
  • http.http (cyclomatic 17) REDACTED:16 — http.http has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 23, 96). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · check-internal-packages.checkInternalPackages (cyclomatic 17) · ×1
  • check-internal-packages.checkInternalPackages (cyclomatic 17) scripts/check-internal-packages.js:372 — check-internal-packages.checkInternalPackages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · getMemberStatusText (cyclomatic 17) · ×1
  • getMemberStatusText (cyclomatic 17) ghost/core/core/server/services/email-service/email-renderer.js:883 — getMemberStatusText has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · onSaving (cyclomatic 17) · ×1
  • onSaving (cyclomatic 17) ghost/core/core/server/models/user.js:227 — onSaving has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · attachSubscriptionsToMember (cyclomatic 17) · ×1
  • attachSubscriptionsToMember (cyclomatic 17) ghost/core/core/server/services/members/members-api/services/member-bread-service.js:121 — attachSubscriptionsToMember has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fetchBookmarkData (cyclomatic 17) · ×1
  • fetchBookmarkData (cyclomatic 17) ghost/core/core/server/services/oembed/oembed-service.js:490 — fetchBookmarkData has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 9 function items inside it that branch (pickFn, pickBiggest::(anonymous), pickFn::(anonymous), …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · handleDonationEvent (cyclomatic 17) · ×1
  • handleDonationEvent (cyclomatic 17) ghost/core/core/server/services/stripe/services/webhook/checkout-session-event-service.js:214 — handleDonationEvent has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · send (cyclomatic 17) · ×1
  • send (cyclomatic 17) ghost/core/core/server/services/lib/mailgun-client.js:40 — send has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mediaValidation · ×1
  • mediaValidation::mediaUploadValidation (cyclomatic 17) ghost/core/core/server/web/api/middleware/upload.js:409 — mediaValidation::mediaUploadValidation has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _getImageSizeFromUrl (cyclomatic 17) · ×1
  • _getImageSizeFromUrl (cyclomatic 17) ghost/core/core/server/lib/image/image-size.js:179 — _getImageSizeFromUrl has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 207, 198). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · paid-subscription-change-chart.fillMissingDataPoints (cyclomatic 16) · ×1
  • paid-subscription-change-chart.fillMissingDataPoints (cyclomatic 16) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:48 — paid-subscription-change-chart.fillMissingDataPoints has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · admin-layout.AdminLayout (cyclomatic 16) · ×1
  • admin-layout.AdminLayout (cyclomatic 16) apps/admin/src/layout/admin-layout.tsx:54 — admin-layout.AdminLayout has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · email-preview.EmailPreview (cyclomatic 16) · ×1
  • email-preview.EmailPreview (cyclomatic 16) apps/admin/src/editor/preview/email-preview.tsx:83 — email-preview.EmailPreview has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · content-text.renderedTextOf (cyclomatic 16) · ×1
  • content-text.renderedTextOf (cyclomatic 16) apps/admin/src/editor/session/content-text.ts:127 — content-text.renderedTextOf has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mapping.detectFieldTypes (cyclomatic 16) · ×1
  • mapping.detectFieldTypes (cyclomatic 16) apps/admin/src/members/components/bulk-action-modals/import-members/mapping.ts:193 — mapping.detectFieldTypes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · members-list.MembersList (cyclomatic 16) · ×1
  • members-list.MembersList (cyclomatic 16) apps/admin/src/members/components/members-list.tsx:56 — members-list.MembersList has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 115, 131, 89, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · member-actions-menu.MemberActionsMenu (cyclomatic 16) · ×1
  • member-actions-menu.MemberActionsMenu (cyclomatic 16) apps/admin/src/members/detail/member-actions-menu.tsx:42 — member-actions-menu.MemberActionsMenu has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · member-custom-fields-field.MemberCustomFieldEditModal (cyclomatic 16) · ×1
  • member-custom-fields-field.MemberCustomFieldEditModal (cyclomatic 16) apps/admin/src/members/detail/member-custom-fields-field.tsx:222 — member-custom-fields-field.MemberCustomFieldEditModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 253, 287, 298, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · stripe-connect-modal.Connect (cyclomatic 16) · ×1
  • stripe-connect-modal.Connect (cyclomatic 16) apps/admin/src/settings/membership/stripe/stripe-connect-modal.tsx:70 — stripe-connect-modal.Connect has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 89, 122). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · tag-detail-edit.buildTagSavePayload (cyclomatic 16) · ×1
  • tag-detail-edit.buildTagSavePayload (cyclomatic 16) apps/admin/src/tags/detail/tag-detail-edit.ts:193 — tag-detail-edit.buildTagSavePayload has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-global-search.useGlobalSearch (cyclomatic 16) · ×1
  • use-global-search.useGlobalSearch (cyclomatic 16) apps/admin/src/global-search/use-global-search.ts:62 — use-global-search.useGlobalSearch has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-theme.useTheme (cyclomatic 16) · ×1
  • use-theme.useTheme (cyclomatic 16) apps/admin/src/hooks/use-theme.ts:52 — use-theme.useTheme has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 65, 108, 101, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · label-picker.LabelListItems (cyclomatic 16) · ×1
  • label-picker.LabelListItems (cyclomatic 16) apps/admin/src/members/label-picker/label-picker.tsx:100 — label-picker.LabelListItems has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · label-filter-renderer.LabelFilterRenderer (cyclomatic 16) · ×1
  • label-filter-renderer.LabelFilterRenderer (cyclomatic 16) apps/admin/src/members/label-picker/label-filter-renderer.tsx:19 — label-filter-renderer.LabelFilterRenderer has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 53, 33, 114, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · confirmation-modal.ConfirmationModalContent (cyclomatic 16) · ×1
  • confirmation-modal.ConfirmationModalContent (cyclomatic 16) apps/admin/src/settings/components/confirmation-modal.tsx:40 — confirmation-modal.ConfirmationModalContent has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · scroll-section-provider.ScrollSectionProvider (cyclomatic 16) · ×1
  • scroll-section-provider.ScrollSectionProvider (cyclomatic 16) apps/admin/src/settings/hooks/scroll-section-provider.tsx:98 — scroll-section-provider.ScrollSectionProvider has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 140, 170, 182, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · stats-filter.StatsFilter (cyclomatic 16) · ×1
  • stats-filter.StatsFilter (cyclomatic 16) apps/admin/src/shared/analytics/stats-filter.tsx:338 — stats-filter.StatsFilter has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · comment.PublishedComment (cyclomatic 16) · ×1
  • comment.PublishedComment (cyclomatic 16) apps/comments-ui/src/components/content/comment.tsx:145 — comment.PublishedComment has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SelectionList.shiftItem (cyclomatic 16) · ×1
  • SelectionList.shiftItem (cyclomatic 16) apps/ember-admin/app/components/posts-list/selection-list.js:189 — SelectionList.shiftItem has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotificationsService._showAPIError (cyclomatic 16) · ×1
  • NotificationsService._showAPIError (cyclomatic 16) apps/ember-admin/app/services/notifications.js:168 — NotificationsService._showAPIError has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · account-email-page.AccountEmailPage (cyclomatic 16) · ×1
  • account-email-page.AccountEmailPage (cyclomatic 16) apps/portal/src/components/pages/account-email-page.jsx:8 — account-email-page.AccountEmailPage has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 43, 30, 120, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · filters.FiltersTrigger (cyclomatic 16) · ×1
  • filters.FiltersTrigger (cyclomatic 16) apps/shade/src/components/patterns/filters.tsx:2865 — filters.FiltersTrigger has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MetafieldDefinitionsService.edit (cyclomatic 16) · ×1
  • MetafieldDefinitionsService.edit (cyclomatic 16) ghost/core/core/server/services/members-metafields/definitions-service.ts:550 — MetafieldDefinitionsService.edit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GiftService.reassignRedeemer (cyclomatic 16) · ×1
  • GiftService.reassignRedeemer (cyclomatic 16) ghost/core/core/server/services/gifts/gift-service.ts:1071 — GiftService.reassignRedeemer has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1077). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · get-discount-window.getDiscountWindow (cyclomatic 16) · ×1
  • get-discount-window.getDiscountWindow (cyclomatic 16) ghost/core/core/server/services/members/members-api/utils/get-discount-window.ts:71 — get-discount-window.getDiscountWindow has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProductsImporter.populatePriceData (cyclomatic 16) · ×1
  • ProductsImporter.populatePriceData (cyclomatic 16) ghost/core/core/server/data/importer/importers/data/products-importer.js:33 — ProductsImporter.populatePriceData has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · structured-data.getStructuredData (cyclomatic 16) · ×1
  • structured-data.getStructuredData (cyclomatic 16) ghost/core/core/frontend/meta/structured-data.js:3 — structured-data.getStructuredData has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · asset-url.getAssetUrl (cyclomatic 16) · ×1
  • asset-url.getAssetUrl (cyclomatic 16) ghost/core/core/frontend/meta/asset-url.js:104 — asset-url.getAssetUrl has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · get.querySimplePath (cyclomatic 16) · ×1
  • get.querySimplePath (cyclomatic 16) ghost/core/core/frontend/helpers/get.js:93 — get.querySimplePath has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tags.tags (cyclomatic 16) · ×1
  • tags.tags (cyclomatic 16) ghost/core/core/frontend/helpers/tags.js:14 — tags.tags has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SiteMapManager.constructor (cyclomatic 16) · ×1
  • SiteMapManager.constructor (cyclomatic 16) ghost/core/core/frontend/services/sitemap/site-map-manager.js:36 — SiteMapManager.constructor has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mobiledoc-to-lexical.populateLexicalNodeWithMarkers (cyclomatic 16) · ×1
  • mobiledoc-to-lexical.populateLexicalNodeWithMarkers (cyclomatic 16) koenig/kg-converters/src/mobiledoc-to-lexical.ts:226 — mobiledoc-to-lexical.populateLexicalNodeWithMarkers has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · edit (cyclomatic 16) · ×1
  • edit (cyclomatic 16) ghost/core/core/server/models/user.js:592 — edit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · retryDb (cyclomatic 16) · ×1
  • retryDb (cyclomatic 16) ghost/core/core/server/services/email-service/batch-sending-service.js:1031 — retryDb has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · setupGhostApi · ×1
  • setupGhostApi::checkoutGift (cyclomatic 16) apps/portal/src/utils/api.js:755 — setupGhostApi::checkoutGift has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · reportBillingAppLoadFailure (cyclomatic 16) · ×1
  • reportBillingAppLoadFailure (cyclomatic 16) apps/ember-admin/app/services/billing.js:470 — reportBillingAppLoadFailure has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · nodeLibConfig (cyclomatic 16) · ×1
  • nodeLibConfig (cyclomatic 16) configs/eslint/index.mjs:348 — nodeLibConfig has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · get (cyclomatic 16) · ×1
  • get (cyclomatic 16) ghost/core/core/server/adapters/lib/redis/AdapterCacheRedis.js:273 — get has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · #runARRQueries (cyclomatic 16) · ×1
  • #runARRQueries (cyclomatic 16) ghost/core/core/server/services/milestones/milestones-service.js:197 — #runARRQueries has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · linkSubscription (cognitive 191) · ×1
  • linkSubscription (cognitive 191) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223 — linkSubscription has cognitive complexity 191 (threshold 15). Drivers by points: if/else 55 (112 pts), boolean chains 30, ternaries 9 (15 pts), error handling 5 (14 pts), other 12, loops 4 (8 pts) (nesting depth added 76). Of this number, 179 points are the body's own statements and 12 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · save-engine.createSaveEngine (cognitive 149) · ×1
  • save-engine.createSaveEngine (cognitive 149) apps/admin/src/editor/engine/save-engine.ts:364 — save-engine.createSaveEngine has cognitive complexity 149 (threshold 15). Drivers by points: if/else 75 (93 pts), boolean chains 28, ternaries 8 (12 pts), loops 8 (9 pts), error handling 5 (7 pts) (nesting depth added 25). Of this number, 135 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · onSaving (cognitive 135) · ×1
  • onSaving (cognitive 135) ghost/core/core/server/models/post.js:572 — onSaving has cognitive complexity 135 (threshold 15). Drivers by points: if/else 49 (71 pts), boolean chains 50, loops 3 (6 pts), error handling 2 (4 pts), ternaries 1 (3 pts), other 1 (nesting depth added 29). Of this number, 123 points are the body's own statements and 12 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · theme-code-editor-modal.ThemeCodeEditorModal (cognitive 127) · ×1
  • theme-code-editor-modal.ThemeCodeEditorModal (cognitive 127) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298 — theme-code-editor-modal.ThemeCodeEditorModal has cognitive complexity 127 (threshold 15). Drivers by points: if/else 55 (70 pts), ternaries 21 (28 pts), boolean chains 24, loops 3, error handling 2 (nesting depth added 22). Of this number, 16 points are the body's own statements and 111 belong to 19 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MembersCSVImporter.writeRows (cognitive 93) · ×1
  • MembersCSVImporter.writeRows (cognitive 93) ghost/core/core/server/services/members/import-export/import/importer.ts:421 — MembersCSVImporter.writeRows has cognitive complexity 93 (threshold 15). Drivers by points: if/else 25 (61 pts), ternaries 6 (16 pts), error handling 4 (11 pts), boolean chains 4, loops 1 (nesting depth added 53). Of this number, 89 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · newsletter-preview-content.NewsletterPreviewContent (cognitive 92) · ×1
  • newsletter-preview-content.NewsletterPreviewContent (cognitive 92) REDACTED:56 — newsletter-preview-content.NewsletterPreviewContent has cognitive complexity 92 (threshold 15). Drivers by points: boolean chains 79, if/else 7, ternaries 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · new-note-modal.NewNoteModal (cognitive 87) · ×1
  • new-note-modal.NewNoteModal (cognitive 87) apps/activitypub/src/components/modals/new-note-modal.tsx:44 — new-note-modal.NewNoteModal has cognitive complexity 87 (threshold 15). Drivers by points: if/else 31 (44 pts), boolean chains 22, ternaries 14 (15 pts), match/switch 1 (3 pts), error handling 2, loops 1 (nesting depth added 16). Of this number, 23 points are the body's own statements and 64 belong to 15 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · filters.FilterValueSelector (cognitive 87) · ×1
  • filters.FilterValueSelector (cognitive 87) apps/shade/src/components/patterns/filters.tsx:2182 — filters.FilterValueSelector has cognitive complexity 87 (threshold 15). Drivers by points: boolean chains 37, if/else 19 (24 pts), ternaries 10 (22 pts), match/switch 2 (4 pts) (nesting depth added 19). Of this number, 74 points are the body's own statements and 13 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tier-detail-modal.TierDetailModalContent (cognitive 85) · ×1
  • tier-detail-modal.TierDetailModalContent (cognitive 85) apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:61 — tier-detail-modal.TierDetailModalContent has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 37, if/else 21 (25 pts), ternaries 16 (23 pts) (nesting depth added 11). Of this number, 41 points are the body's own statements and 44 belong to 19 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · domain.Domain (cognitive 84) · ×1
  • domain.Domain (cognitive 84) apps/activitypub/src/views/preferences/components/domain.tsx:88 — domain.Domain has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 20 (37 pts), boolean chains 34, if/else 9, error handling 4 (nesting depth added 17). Of this number, 66 points are the body's own statements and 18 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editor-session.createEditorSession (cognitive 82) · ×1
  • editor-session.createEditorSession (cognitive 82) apps/admin/src/editor/session/editor-session.ts:216 — editor-session.createEditorSession has cognitive complexity 82 (threshold 15). Drivers by points: if/else 35 (41 pts), boolean chains 24, ternaries 9, loops 5, error handling 2 (3 pts) (nesting depth added 7). Of this number, 63 points are the body's own statements and 19 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · update (cognitive 79) · ×1
  • update (cognitive 79) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:664 — update has cognitive complexity 79 (threshold 15). Drivers by points: if/else 29 (52 pts), boolean chains 13, loops 7 (11 pts), other 2, ternaries 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · feed-item.FeedItem (cognitive 77) · ×1
  • feed-item.FeedItem (cognitive 77) apps/activitypub/src/components/feed/feed-item.tsx:506 — feed-item.FeedItem has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 41, if/else 20 (23 pts), ternaries 10 (13 pts) (nesting depth added 6). Of this number, 43 points are the body's own statements and 34 belong to 15 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · reader.Reader (cognitive 77) · ×1
  • reader.Reader (cognitive 77) REDACTED:535 — reader.Reader has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 42, if/else 26 (30 pts), ternaries 3, error handling 1, loops 1 (nesting depth added 4). Of this number, 42 points are the body's own statements and 35 belong to 16 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ghost_head (cognitive 75) · ×1
  • ghost_head (cognitive 75) ghost/core/core/frontend/helpers/ghost_head.js:359 — ghost_head has cognitive complexity 75 (threshold 15). Drivers by points: if/else 32 (54 pts), boolean chains 12, ternaries 6, error handling 2, other 1 (nesting depth added 22). Of this number, 74 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add-offer-modal.AddOfferModal (cognitive 72) · ×1
  • add-offer-modal.AddOfferModal (cognitive 72) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:454 — add-offer-modal.AddOfferModal has cognitive complexity 72 (threshold 15). Drivers by points: boolean chains 37, if/else 23 (25 pts), ternaries 9, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 72 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 540, 748, 817, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tag-detail.TagDetail (cognitive 71) · ×1
  • tag-detail.TagDetail (cognitive 71) apps/admin/src/tags/detail/tag-detail.tsx:54 — tag-detail.TagDetail has cognitive complexity 71 (threshold 15). Drivers by points: if/else 34 (36 pts), boolean chains 28, ternaries 6, loops 1 (nesting depth added 2). Of this number, 29 points are the body's own statements and 42 belong to 13 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · gift-page.GiftPage (cognitive 71) · ×1
  • gift-page.GiftPage (cognitive 71) apps/portal/src/components/pages/gift-page.tsx:84 — gift-page.GiftPage has cognitive complexity 71 (threshold 15). Drivers by points: boolean chains 28, if/else 24 (27 pts), ternaries 15, loops 1 (nesting depth added 3). Of this number, 28 points are the body's own statements and 43 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · filters.ResolvedSelectOptionsPopover (cognitive 70) · ×1
  • filters.ResolvedSelectOptionsPopover (cognitive 70) apps/shade/src/components/patterns/filters.tsx:1815 — filters.ResolvedSelectOptionsPopover has cognitive complexity 70 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 10, ternaries 5 (10 pts), loops 1 (2 pts) (nesting depth added 25). Of this number, 16 points are the body's own statements and 54 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · user-detail-modal.UserDetailModalContent (cognitive 69) · ×1
  • user-detail-modal.UserDetailModalContent (cognitive 69) apps/admin/src/settings/general/user-detail-modal.tsx:121 — user-detail-modal.UserDetailModalContent has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 26, ternaries 17 (18 pts), if/else 14 (17 pts), error handling 5 (6 pts), match/switch 2 (nesting depth added 5). Of this number, 31 points are the body's own statements and 38 belong to 13 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProductRepository.update (cognitive 69) · ×1
  • ProductRepository.update (cognitive 69) ghost/core/core/server/services/members/members-api/repositories/product-repository.js:374 — ProductRepository.update has cognitive complexity 69 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 10, loops 2 (6 pts), ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 28). Of this number, 68 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · posts.default (cognitive 69) · ×1
  • posts.default (cognitive 69) ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js:24 — posts.default has cognitive complexity 69 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 21, ternaries 3 (nesting depth added 16). Of this number, 49 points are the body's own statements and 20 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · member-detail.MemberDetailPage (cognitive 67) · ×1
  • member-detail.MemberDetailPage (cognitive 67) apps/admin/src/members/detail/member-detail.tsx:67 — member-detail.MemberDetailPage has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 30, if/else 21 (23 pts), ternaries 11 (14 pts) (nesting depth added 5). Of this number, 38 points are the body's own statements and 29 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · global-settings.GlobalSettings (cognitive 67) · ×1
  • global-settings.GlobalSettings (cognitive 67) apps/admin/src/settings/site/design-and-branding/global-settings.tsx:101 — global-settings.GlobalSettings has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 33, if/else 27 (28 pts), ternaries 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 15 of the 67 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 149, 109, 400, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.fetchLinkData (cognitive 67) · ×1
  • App.fetchLinkData (cognitive 67) REDACTED:668 — App.fetchLinkData has cognitive complexity 67 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 11 (24 pts), boolean chains 17 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · notifications.Notifications (cognitive 66) · ×1
  • notifications.Notifications (cognitive 66) apps/activitypub/src/views/notifications/notifications.tsx:306 — notifications.Notifications has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 44, if/else 10 (15 pts), ternaries 2 (6 pts), match/switch 1 (nesting depth added 9). Of this number, 42 points are the body's own statements and 24 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · post-preview-modal.PostPreviewModal (cognitive 65) · ×1
  • post-preview-modal.PostPreviewModal (cognitive 65) apps/admin/src/editor/preview/post-preview-modal.tsx:80 — post-preview-modal.PostPreviewModal has cognitive complexity 65 (threshold 15). Drivers by points: boolean chains 36, ternaries 11 (15 pts), if/else 12 (13 pts), error handling 1 (nesting depth added 5). Of this number, 44 points are the body's own statements and 21 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · slug-machine.createSlugMachine (cognitive 65) · ×1
  • slug-machine.createSlugMachine (cognitive 65) apps/admin/src/editor/engine/slug-machine.ts:123 — slug-machine.createSlugMachine has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33 (44 pts), boolean chains 9, error handling 3 (6 pts), ternaries 4 (5 pts), loops 1 (nesting depth added 15). Most of this is not in the body itself: 8 of the 65 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 358, 263, 297, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · service.createLlmsService (cognitive 65) · ×1
  • service.createLlmsService (cognitive 65) ghost/core/core/frontend/services/llms/service.js:33 — service.createLlmsService has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 19, ternaries 11 (14 pts), loops 4 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edit-retention-offer-modal.EditRetentionOfferModal (cognitive 64) · ×1
  • edit-retention-offer-modal.EditRetentionOfferModal (cognitive 64) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:503 — edit-retention-offer-modal.EditRetentionOfferModal has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 30, if/else 21 (26 pts), ternaries 7, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 64 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 586, 675, 563, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · filters.Filters (cognitive 64) · ×1
  • filters.Filters (cognitive 64) apps/shade/src/components/patterns/filters.tsx:2947 — filters.Filters has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 34, if/else 24 (28 pts), ternaries 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 46 belong to 18 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · member-activity.ActivityPage (cognitive 62) · ×1
  • member-activity.ActivityPage (cognitive 62) apps/admin/src/members/activity/member-activity.tsx:48 — member-activity.ActivityPage has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 11 (30 pts), boolean chains 22, if/else 5 (10 pts) (nesting depth added 24). Of this number, 43 points are the body's own statements and 19 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mapping-step.MappingStep (cognitive 60) · ×1
  • mapping-step.MappingStep (cognitive 60) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx:105 — mapping-step.MappingStep has cognitive complexity 60 (threshold 15). Drivers by points: boolean chains 28, ternaries 12 (17 pts), if/else 13 (14 pts), error handling 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 41 belong to 15 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LexicalEditorController.saveTask (cognitive 60) · ×1
  • LexicalEditorController.saveTask (cognitive 60) REDACTED:591 — LexicalEditorController.saveTask has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 12, ternaries 2 (5 pts), error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile.ProfileCard (cognitive 59) · ×1
  • profile.ProfileCard (cognitive 59) apps/activitypub/src/views/preferences/components/profile.tsx:54 — profile.ProfileCard has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 25 (36 pts), boolean chains 17, if/else 3, match/switch 2, error handling 1 (nesting depth added 11). Of this number, 51 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-publish-flow.usePublishFlow (cognitive 59) · ×1
  • use-publish-flow.usePublishFlow (cognitive 59) apps/admin/src/editor/publish/use-publish-flow.ts:98 — use-publish-flow.usePublishFlow has cognitive complexity 59 (threshold 15). Drivers by points: if/else 31 (39 pts), boolean chains 8, error handling 6 (7 pts), ternaries 3 (5 pts) (nesting depth added 11). Most of this is not in the body itself: 0 of the 59 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 385, 483, 228, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · member-event.getAction (cognitive 59) · ×1
  • member-event.getAction (cognitive 59) apps/admin/src/members/detail/member-event.ts:240 — member-event.getAction has cognitive complexity 59 (threshold 15). Drivers by points: if/else 29 (37 pts), ternaries 7 (16 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editor.AutomationEditorContent (cognitive 59) · ×1
  • editor.AutomationEditorContent (cognitive 59) apps/admin/src/automations/editor.tsx:67 — editor.AutomationEditorContent has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 13 (15 pts), boolean chains 14, match/switch 9 (12 pts) (nesting depth added 12). Of this number, 20 points are the body's own statements and 39 belong to 12 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · newsletter-detail-modal.Sidebar (cognitive 58) · ×1
  • newsletter-detail-modal.Sidebar (cognitive 58) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:166 — newsletter-detail-modal.Sidebar has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 38, if/else 8 (10 pts), ternaries 6, error handling 2 (4 pts) (nesting depth added 4). Of this number, 27 points are the body's own statements and 31 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PostsExporter.filterToString (cognitive 58) · ×1
  • PostsExporter.filterToString (cognitive 58) ghost/core/core/server/services/posts/posts-exporter.js:389 — PostsExporter.filterToString has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (54 pts), loops 2 (4 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · lexical-to-mobiledoc.buildMarkers (cognitive 58) · ×1
  • lexical-to-mobiledoc.buildMarkers (cognitive 58) koenig/kg-converters/src/lexical-to-mobiledoc.ts:249 — lexical-to-mobiledoc.buildMarkers has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (56 pts), boolean chains 2 (nesting depth added 36). Most of this is not in the body itself: 2 of the 58 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 262, 316, 270, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · newsletter.Newsletter (cognitive 57) · ×1
  • newsletter.Newsletter (cognitive 57) apps/admin/src/posts/analytics/newsletter/newsletter.tsx:102 — newsletter.Newsletter has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 36, if/else 12 (15 pts), ternaries 4 (6 pts) (nesting depth added 5). Of this number, 38 points are the body's own statements and 19 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · permissible (cognitive 57) · ×1
  • permissible (cognitive 57) ghost/core/core/server/models/user.js:881 — permissible has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 17 (nesting depth added 16). Of this number, 35 points are the body's own statements and 22 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · change-tracker.createChangeTracker (cognitive 56) · ×1
  • change-tracker.createChangeTracker (cognitive 56) apps/admin/src/editor/engine/change-tracker.ts:233 — change-tracker.createChangeTracker has cognitive complexity 56 (threshold 15). Drivers by points: if/else 29 (31 pts), boolean chains 16, error handling 3 (4 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). Of this number, 55 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ParseMemberEventHelper.getAction (cognitive 56) · ×1
  • ParseMemberEventHelper.getAction (cognitive 56) apps/ember-admin/app/helpers/parse-member-event.js:194 — ParseMemberEventHelper.getAction has cognitive complexity 56 (threshold 15). Drivers by points: if/else 34 (46 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · authors.extendModel (cognitive 55) · ×1
  • authors.extendModel (cognitive 55) ghost/core/core/server/models/relations/authors.js:32 — authors.extendModel has cognitive complexity 55 (threshold 15). Drivers by points: if/else 29 (32 pts), boolean chains 19, loops 2, error handling 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 0 of the 55 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 340, 141, 40, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · source-utils.processSources (cognitive 54) · ×1
  • source-utils.processSources (cognitive 54) apps/admin-x-framework/src/utils/source-utils.ts:284 — source-utils.processSources has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 25, if/else 13 (20 pts), ternaries 6 (9 pts) (nesting depth added 10). Most of this is not in the body itself: 15 of the 54 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 307, 390). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · create (cognitive 54) · ×1
  • create (cognitive 54) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:425 — create has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 12, loops 4 (6 pts), error handling 1 (3 pts), other 1, ternaries 1 (nesting depth added 12). Of this number, 52 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reader.ArticleBody (cognitive 52) · ×1
  • reader.ArticleBody (cognitive 52) REDACTED:75 — reader.ArticleBody has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (20 pts), ternaries 15 (19 pts), boolean chains 13 (nesting depth added 5). Of this number, 24 points are the body's own statements and 28 belong to 12 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · growth.Growth (cognitive 52) · ×1
  • growth.Growth (cognitive 52) apps/admin/src/analytics/views/stats/growth/growth.tsx:74 — growth.Growth has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 9 (26 pts), boolean chains 19, if/else 7 (nesting depth added 17). Of this number, 25 points are the body's own statements and 27 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · check-internal-packages.validateCompliantPackage (cognitive 52) · ×1
  • check-internal-packages.validateCompliantPackage (cognitive 52) scripts/check-internal-packages.js:193 — check-internal-packages.validateCompliantPackage has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 8 (12 pts), boolean chains 6 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · paid-subscription-change-chart.PaidMembersChangeChart (cognitive 51) · ×1
  • paid-subscription-change-chart.PaidMembersChangeChart (cognitive 51) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:180 — paid-subscription-change-chart.PaidMembersChangeChart has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 24, if/else 11 (18 pts), ternaries 4 (8 pts), match/switch 1 (nesting depth added 11). Most of this is not in the body itself: 5 of the 51 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 217, 465, 256, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-post-bulk-actions.usePostBulkActions (cognitive 51) · ×1
  • use-post-bulk-actions.usePostBulkActions (cognitive 51) apps/admin/src/posts/list/hooks/use-post-bulk-actions.ts:142 — use-post-bulk-actions.usePostBulkActions has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 10 (20 pts), boolean chains 5, error handling 2, loops 1 (nesting depth added 16). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 295, 368, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · locale-validation.validateLocale (cognitive 51) · ×1
  • locale-validation.validateLocale (cognitive 51) apps/admin/src/settings/utils/locale-validation.ts:46 — locale-validation.validateLocale has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (32 pts), loops 6 (10 pts), boolean chains 9 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.fetchQueryStrData (cognitive 51) · ×1
  • App.fetchQueryStrData (cognitive 51) REDACTED:492 — App.fetchQueryStrData has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (33 pts), boolean chains 17, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · getTemplateData (cognitive 51) · ×1
  • getTemplateData (cognitive 51) ghost/core/core/server/services/email-service/email-renderer.js:1288 — getTemplateData has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 16 (29 pts), boolean chains 11, if/else 5 (8 pts), loops 1 (2 pts), other 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · feed-item.renderFeedAttachment (cognitive 50) · ×1
  • feed-item.renderFeedAttachment (cognitive 50) apps/activitypub/src/components/feed/feed-item.tsx:78 — feed-item.renderFeedAttachment has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 8 (18 pts), boolean chains 9, match/switch 1 (nesting depth added 18). Of this number, 38 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · publish-options.createPublishOptions (cognitive 50) · ×1
  • publish-options.createPublishOptions (cognitive 50) apps/admin/src/editor/publish/publish-options.ts:329 — publish-options.createPublishOptions has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 20, ternaries 5, error handling 2 (nesting depth added 5). Of this number, 25 points are the body's own statements and 25 belong to 8 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · import-members-modal.ImportMembersModal (cognitive 50) · ×1
  • import-members-modal.ImportMembersModal (cognitive 50) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:68 — import-members-modal.ImportMembersModal has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 21, if/else 16 (20 pts), ternaries 3 (6 pts), error handling 1, loops 1, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 12 of the 50 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 309, 158, 120, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · route-settings-parser.serializeRouteSettings (cognitive 50) · ×1
  • route-settings-parser.serializeRouteSettings (cognitive 50) ghost/core/core/server/services/route-settings/route-settings-parser.ts:501 — route-settings-parser.serializeRouteSettings has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 3, loops 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile-page.ProfilePage (cognitive 49) · ×1
  • profile-page.ProfilePage (cognitive 49) apps/activitypub/src/views/profile/components/profile-page.tsx:58 — profile-page.ProfilePage has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 24, if/else 13, ternaries 11, error handling 1. Of this number, 34 points are the body's own statements and 15 belong to 9 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · description.getDescription (cognitive 49) · ×1
  • description.getDescription (cognitive 49) ghost/core/core/frontend/meta/description.js:5 — description.getDescription has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 23, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · newsletter-preview.NewsletterPreview (cognitive 48) · ×1
  • newsletter-preview.NewsletterPreview (cognitive 48) apps/admin/src/settings/email/newsletters/newsletter-preview.tsx:9 — newsletter-preview.NewsletterPreview has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 26, if/else 16, ternaries 6. Of this number, 25 points are the body's own statements and 23 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · chip-picker.ChipPicker (cognitive 48) · ×1
  • chip-picker.ChipPicker (cognitive 48) apps/admin/src/shared/pickers/chip-picker.tsx:77 — chip-picker.ChipPicker has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 14, ternaries 10 (13 pts) (nesting depth added 7). Most of this is not in the body itself: 15 of the 48 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 238, 221, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · settings-modal.SettingsModal (cognitive 47) · ×1
  • settings-modal.SettingsModal (cognitive 47) apps/shade/src/components/patterns/settings-modal.tsx:130 — settings-modal.SettingsModal has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 31, if/else 12, ternaries 4. Of this number, 33 points are the body's own statements and 14 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · getTopPostsViews (cognitive 47) · ×1
  • getTopPostsViews (cognitive 47) ghost/core/core/server/services/stats/posts-stats-service.js:1256 — getTopPostsViews has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 15 (24 pts), boolean chains 11, if/else 7 (11 pts), error handling 1 (nesting depth added 13). Most of this is not in the body itself: 15 of the 47 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 1341, 1450, 1318, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · edit-profile.EditProfile (cognitive 46) · ×1
  • edit-profile.EditProfile (cognitive 46) apps/activitypub/src/views/preferences/components/edit-profile.tsx:63 — edit-profile.EditProfile has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (14 pts), match/switch 2 (6 pts), ternaries 4, error handling 2 (nesting depth added 9). Of this number, 19 points are the body's own statements and 27 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api.setupGhostApi (cognitive 46) · ×1
  • api.setupGhostApi (cognitive 46) apps/comments-ui/src/utils/api.ts:3 — api.setupGhostApi has cognitive complexity 46 (threshold 15). Drivers by points: if/else 36 (37 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 27 belong to 15 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · renderBody (cognitive 46) · ×1
  • renderBody (cognitive 46) ghost/core/core/server/services/email-service/email-renderer.js:572 — renderBody has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 7, ternaries 4 (6 pts), loops 1 (nesting depth added 14). Of this number, 22 points are the body's own statements and 24 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createSessionService (cognitive 46) · ×1
  • createSessionService (cognitive 46) ghost/core/core/server/services/auth/session/session-service.js:66 — createSessionService has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 17, error handling 4, ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 0 of the 46 points are its own statements and the rest belongs to 26 function items inside it that branch (assignUserToSession, getGeolocationFromIP, getUserForSession, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · member-activity-pagination.loadMemberActivityPage (cognitive 45) · ×1
  • member-activity-pagination.loadMemberActivityPage (cognitive 45) apps/admin-x-framework/src/api/member-activity-pagination.ts:71 — member-activity-pagination.loadMemberActivityPage has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 9, ternaries 4 (9 pts), loops 1 (nesting depth added 19). Of this number, 42 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update-flow-modal.KeyedUpdateFlowModal (cognitive 45) · ×1
  • update-flow-modal.KeyedUpdateFlowModal (cognitive 45) apps/admin/src/editor/publish/update-flow-modal.tsx:54 — update-flow-modal.KeyedUpdateFlowModal has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 18 (24 pts), boolean chains 13, if/else 6 (7 pts), error handling 1 (nesting depth added 7). Of this number, 36 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · import-members-modal.ImportMembersModal (cognitive 45) · ×1
  • import-members-modal.ImportMembersModal (cognitive 45) apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:42 — import-members-modal.ImportMembersModal has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 17, ternaries 4 (6 pts), error handling 1, loops 1, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 10 of the 45 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 217, 195, 66, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · comments.commentMapper (cognitive 45) · ×1
  • comments.commentMapper (cognitive 45) ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:51 — comments.commentMapper has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 15, ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · #mapPosts (cognitive 45) · ×1
  • #mapPosts (cognitive 45) ghost/core/core/server/services/posts/posts-exporter.js:192 — #mapPosts has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, ternaries 9, other 7, loops 2 (5 pts) (nesting depth added 8). Of this number, 21 points are the body's own statements and 24 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · search.Search (cognitive 44) · ×1
  • search.Search (cognitive 44) apps/activitypub/src/components/modals/search.tsx:53 — search.Search has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 20, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 14 of the 44 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 183, 117, 152, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · universal-import-modal.UniversalImportModal (cognitive 44) · ×1
  • universal-import-modal.UniversalImportModal (cognitive 44) apps/admin/src/settings/advanced/migration-tools/universal-import-modal.tsx:23 — universal-import-modal.UniversalImportModal has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 12 (20 pts), if/else 8 (14 pts), boolean chains 6, error handling 3 (4 pts) (nesting depth added 15). Of this number, 19 points are the body's own statements and 25 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · notification.NotificationText (cognitive 44) · ×1
  • notification.NotificationText (cognitive 44) apps/portal/src/components/notification.jsx:31 — notification.NotificationText has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 16, ternaries 4 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · signup-options.SignupOptions (cognitive 43) · ×1
  • signup-options.SignupOptions (cognitive 43) apps/admin/src/settings/membership/portal/signup-options.tsx:44 — signup-options.SignupOptions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 18, ternaries 2 (5 pts) (nesting depth added 10). Most of this is not in the body itself: 14 of the 43 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 82, 120, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · route-settings-parser.parseRouteSettings (cognitive 43) · ×1
  • route-settings-parser.parseRouteSettings (cognitive 43) ghost/core/core/server/services/route-settings/route-settings-parser.ts:389 — route-settings-parser.parseRouteSettings has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleSubscriptionEvent (cognitive 43) · ×1
  • handleSubscriptionEvent (cognitive 43) ghost/core/core/server/services/stripe/services/webhook/checkout-session-event-service.js:330 — handleSubscriptionEvent has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (19 pts), other 12, error handling 2 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reactAppConfig (cognitive 43) · ×1
  • reactAppConfig (cognitive 43) configs/eslint-react/index.mjs:139 — reactAppConfig has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 14 (18 pts), if/else 10, boolean chains 9, other 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · custom-field-modal.CustomFieldModal (cognitive 42) · ×1
  • custom-field-modal.CustomFieldModal (cognitive 42) apps/admin/src/settings/membership/custom-fields/custom-field-modal.tsx:43 — custom-field-modal.CustomFieldModal has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 14, if/else 9, error handling 4 (nesting depth added 4). Of this number, 26 points are the body's own statements and 16 belong to 9 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · newsletters-kpis.NewsletterKPIs (cognitive 41) · ×1
  • newsletters-kpis.NewsletterKPIs (cognitive 41) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:110 — newsletters-kpis.NewsletterKPIs has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 24, if/else 15, ternaries 2. Of this number, 24 points are the body's own statements and 17 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · post-editor.PostEditor (cognitive 41) · ×1
  • post-editor.PostEditor (cognitive 41) apps/admin/src/editor/post-editor.tsx:92 — post-editor.PostEditor has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 22, if/else 14 (17 pts), ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 6 of the 41 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 170, 199, 158, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · automation-canvas.AutomationCanvas (cognitive 41) · ×1
  • automation-canvas.AutomationCanvas (cognitive 41) apps/admin/src/automations/components/canvas/automation-canvas.tsx:388 — automation-canvas.AutomationCanvas has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23, boolean chains 15, ternaries 3. Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 421, 470, 625, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · comment-likes-modal.CommentLikesModal (cognitive 41) · ×1
  • comment-likes-modal.CommentLikesModal (cognitive 41) REDACTED:33 — comment-likes-modal.CommentLikesModal has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 16 (34 pts), boolean chains 7 (nesting depth added 18). Of this number, 30 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · email-content-modal.EmailContentModal (cognitive 41) · ×1
  • email-content-modal.EmailContentModal (cognitive 41) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:124 — email-content-modal.EmailContentModal has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 23, if/else 16 (17 pts), loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 24 belong to 12 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sidebar.Sidebar (cognitive 40) · ×1
  • sidebar.Sidebar (cognitive 40) apps/admin/src/settings/layout/sidebar.tsx:115 — sidebar.Sidebar has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 17, ternaries 12 (13 pts), if/else 9 (10 pts) (nesting depth added 2). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 172, 145, 133, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MembersStripeCustomersSubscriptionsImporter.generate (cognitive 40) · ×1
  • MembersStripeCustomersSubscriptionsImporter.generate (cognitive 40) ghost/core/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js:100 — MembersStripeCustomersSubscriptionsImporter.generate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (32 pts), ternaries 4 (5 pts), boolean chains 3 (nesting depth added 12). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · moderation.Moderation (cognitive 39) · ×1
  • moderation.Moderation (cognitive 39) apps/activitypub/src/views/preferences/components/moderation.tsx:41 — moderation.Moderation has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 16 (34 pts), boolean chains 4, if/else 1 (nesting depth added 18). Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 181, 266, 77). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · change-password-form.ChangePasswordForm (cognitive 39) · ×1
  • change-password-form.ChangePasswordForm (cognitive 39) apps/admin/src/settings/general/users/change-password-form.tsx:52 — change-password-form.ChangePasswordForm has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 13, ternaries 3 (4 pts), loops 2, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 13 of the 39 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 73, 167, 153, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · app.App (cognitive 39) · ×1
  • app.App (cognitive 39) apps/comments-ui/src/app.tsx:36 — app.App has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 12, error handling 4, ternaries 3, loops 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 312, 155, 249, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · latest-post.LatestPost (cognitive 38) · ×1
  • latest-post.LatestPost (cognitive 38) apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:52 — latest-post.LatestPost has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 24, ternaries 6 (11 pts), if/else 2 (3 pts) (nesting depth added 6). Of this number, 34 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · paid-subscription-change-chart.fillMissingDataPoints (cognitive 38) · ×1
  • paid-subscription-change-chart.fillMissingDataPoints (cognitive 38) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:48 — paid-subscription-change-chart.fillMissingDataPoints has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · posts-list-screen.PostsListScreen (cognitive 38) · ×1
  • posts-list-screen.PostsListScreen (cognitive 38) apps/admin/src/posts/list/posts-list-screen.tsx:61 — posts-list-screen.PostsListScreen has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 19, ternaries 9 (18 pts), if/else 1 (nesting depth added 9). Of this number, 36 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · invite-user-modal.InviteUserModal (cognitive 38) · ×1
  • invite-user-modal.InviteUserModal (cognitive 38) apps/admin/src/settings/general/invite-user-modal.tsx:30 — invite-user-modal.InviteUserModal has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 9, ternaries 3 (4 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 96, 60, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SelectionList.shiftItem (cognitive 38) · ×1
  • SelectionList.shiftItem (cognitive 38) apps/ember-admin/app/components/posts-list/selection-list.js:189 — SelectionList.shiftItem has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 2 (9 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · .lintstagedrc.expandPattern (cognitive 37) · ×1
  • .lintstagedrc.expandPattern (cognitive 37) .lintstagedrc.cjs:36 — .lintstagedrc.expandPattern has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (17 pts), ternaries 3 (13 pts), loops 3 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile.Profile (cognitive 37) · ×1
  • profile.Profile (cognitive 37) apps/activitypub/src/views/preferences/components/profile.tsx:242 — profile.Profile has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 16, if/else 11 (13 pts), ternaries 4, error handling 2, match/switch 2 (nesting depth added 2). Most of this is not in the body itself: 12 of the 37 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 255, 315, 289, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · locations-card.LocationsCard (cognitive 37) · ×1
  • locations-card.LocationsCard (cognitive 37) apps/admin/src/analytics/views/stats/locations/components/locations-card.tsx:96 — locations-card.LocationsCard has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 18, ternaries 7 (14 pts), if/else 5 (nesting depth added 7). Most of this is not in the body itself: 6 of the 37 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 298, 110, 152, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · complete-step.CompleteStep (cognitive 37) · ×1
  • complete-step.CompleteStep (cognitive 37) apps/admin/src/editor/publish/components/complete-step.tsx:62 — complete-step.CompleteStep has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 17 (35 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · design-and-theme-modal.DesignAndThemeModal (cognitive 37) · ×1
  • design-and-theme-modal.DesignAndThemeModal (cognitive 37) apps/admin/src/settings/site/design-and-theme-modal.tsx:11 — design-and-theme-modal.DesignAndThemeModal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28 (33 pts), boolean chains 4 (nesting depth added 5). Of this number, 18 points are the body's own statements and 19 belong to 7 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · unsubscribe-page.UnsubscribePage (cognitive 37) · ×1
  • unsubscribe-page.UnsubscribePage (cognitive 37) apps/portal/src/components/pages/unsubscribe-page.jsx:83 — unsubscribe-page.UnsubscribePage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22, boolean chains 9, ternaries 3 (5 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 37 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 200, 316, 105, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · unblock-dialog.UnblockDialog (cognitive 36) · ×1
  • unblock-dialog.UnblockDialog (cognitive 36) apps/activitypub/src/views/profile/components/unblock-dialog.tsx:31 — unblock-dialog.UnblockDialog has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 11, ternaries 9 (nesting depth added 1). Most of this is not in the body itself: 4 of the 36 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 43, 69, 108, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · post-analytics-header.PostAnalyticsHeader (cognitive 36) · ×1
  • post-analytics-header.PostAnalyticsHeader (cognitive 36) apps/admin/src/posts/analytics/components/post-analytics-header.tsx:66 — post-analytics-header.PostAnalyticsHeader has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 25, if/else 9 (10 pts), error handling 1 (nesting depth added 1). Of this number, 23 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · tiers.Tiers (cognitive 36) · ×1
  • tiers.Tiers (cognitive 36) apps/admin/src/settings/membership/tiers.tsx:72 — tiers.Tiers has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 21, if/else 6 (8 pts), ternaries 4 (5 pts), error handling 1 (2 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PostMediaInliner.inlineLexicalChildren (cognitive 36) · ×1
  • PostMediaInliner.inlineLexicalChildren (cognitive 36) ghost/core/core/server/services/content-import/import/media.ts:195 — PostMediaInliner.inlineLexicalChildren has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 5 (10 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContentCSVImporter.processRows (cognitive 36) · ×1
  • ContentCSVImporter.processRows (cognitive 36) ghost/core/core/server/services/content-import/import/importer.ts:239 — ContentCSVImporter.processRows has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 5 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · foreach.foreach (cognitive 36) · ×1
  • foreach.foreach (cognitive 36) ghost/core/core/frontend/helpers/foreach.js:22 — foreach.foreach has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 16 (nesting depth added 3). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · generate-img-attrs.generateImgSrcAttrs (cognitive 36) · ×1
  • generate-img-attrs.generateImgSrcAttrs (cognitive 36) koenig/kg-default-cards/src/utils/generate-img-attrs.ts:64 — generate-img-attrs.generateImgSrcAttrs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 6 (nesting depth added 17). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UnsplashSearchModal.UnsplashSearchModal (cognitive 36) · ×1
  • UnsplashSearchModal.UnsplashSearchModal (cognitive 36) koenig/kg-unsplash-selector/src/UnsplashSearchModal.tsx:18 — UnsplashSearchModal.UnsplashSearchModal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 8 (nesting depth added 7). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 83, 110, 164, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · onUpdated (cognitive 36) · ×1
  • onUpdated (cognitive 36) ghost/core/core/server/models/post.js:420 — onUpdated has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-growth-stats.calculateTotals (cognitive 35) · ×1
  • use-growth-stats.calculateTotals (cognitive 35) apps/admin/src/analytics/hooks/use-growth-stats.ts:18 — use-growth-stats.calculateTotals has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 4 (9 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · actions.updateProfile (cognitive 35) · ×1
  • actions.updateProfile (cognitive 35) apps/portal/src/actions.js:960 — actions.updateProfile has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 12 (25 pts), if/else 6 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · title.getTitle (cognitive 35) · ×1
  • title.getTitle (cognitive 35) ghost/core/core/frontend/meta/title.js:11 — title.getTitle has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 19, if/else 13 (14 pts), ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AutomationRunStepsImporter.import (cognitive 35) · ×1
  • AutomationRunStepsImporter.import (cognitive 35) ghost/core/core/server/data/seeders/importers/automation-run-steps-importer.ts:55 — AutomationRunStepsImporter.import has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 6 (10 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · members.MembersPage (cognitive 34) · ×1
  • members.MembersPage (cognitive 34) apps/admin/src/members/members.tsx:46 — members.MembersPage has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 22, ternaries 4 (10 pts), if/else 2 (nesting depth added 6). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · top-level-group.TopLevelGroup (cognitive 34) · ×1
  • top-level-group.TopLevelGroup (cognitive 34) apps/admin/src/settings/components/top-level-group.tsx:40 — top-level-group.TopLevelGroup has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 21, ternaries 6 (10 pts), if/else 3 (nesting depth added 4). Of this number, 24 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · OEmbedService.fetchOembedDataFromUrl (cognitive 34) · ×1
  • OEmbedService.fetchOembedDataFromUrl (cognitive 34) ghost/core/core/server/services/oembed/oembed-service.js:755 — OEmbedService.fetchOembedDataFromUrl has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 5, ternaries 2, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCheckoutSession (cognitive 34) · ×1
  • createCheckoutSession (cognitive 34) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:759 — createCheckoutSession has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 5, error handling 1 (3 pts), other 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createBatches (cognitive 34) · ×1
  • createBatches (cognitive 34) ghost/core/core/server/services/email-service/batch-sending-service.js:401 — createBatches has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 3, other 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-activity-pub-queries.useDeleteMutationForUser (cognitive 33) · ×1
  • use-activity-pub-queries.useDeleteMutationForUser (cognitive 33) apps/activitypub/src/hooks/use-activity-pub-queries.ts:2165 — use-activity-pub-queries.useDeleteMutationForUser has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (26 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 0 of the 33 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 2175, 2494, 2428, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · profile-preview-hover-card.ProfilePreviewHoverCard (cognitive 33) · ×1
  • profile-preview-hover-card.ProfilePreviewHoverCard (cognitive 33) apps/activitypub/src/components/global/profile-preview-hover-card.tsx:35 — profile-preview-hover-card.ProfilePreviewHoverCard has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 18, ternaries 7 (8 pts), if/else 7 (nesting depth added 1). Of this number, 26 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · fetch-api.useFetchApi (cognitive 33) · ×1
  • fetch-api.useFetchApi (cognitive 33) apps/admin-x-framework/src/utils/api/fetch-api.ts:161 — fetch-api.useFetchApi has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 6, ternaries 4, error handling 1 (2 pts), loops 1 (nesting depth added 14). Most of this is not in the body itself: 0 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 167, 211, 245). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-label-picker.useLabelPicker (cognitive 33) · ×1
  • use-label-picker.useLabelPicker (cognitive 33) apps/admin/src/members/hooks/use-label-picker.ts:36 — use-label-picker.useLabelPicker has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), error handling 3 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 0 of the 33 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 111, 171, 151, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-post-success-modal.usePostSuccessModal (cognitive 33) · ×1
  • use-post-success-modal.usePostSuccessModal (cognitive 33) apps/admin/src/posts/analytics/hooks/use-post-success-modal.ts:20 — use-post-success-modal.usePostSuccessModal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, ternaries 6 (9 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 77, 68, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · welcome-email-customize-modal.WelcomeEmailCustomizeModal (cognitive 33) · ×1
  • welcome-email-customize-modal.WelcomeEmailCustomizeModal (cognitive 33) apps/admin/src/settings/membership/member-emails/welcome-email-customize-modal.tsx:299 — welcome-email-customize-modal.WelcomeEmailCustomizeModal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 13, ternaries 5, loops 1 (nesting depth added 3). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 413, 347, 373, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · form.FormEditor (cognitive 33) · ×1
  • form.FormEditor (cognitive 33) apps/comments-ui/src/components/content/forms/form.tsx:27 — form.FormEditor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 11, ternaries 2 (3 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 110, 80, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · middleware.createSessionFromMagicLink (cognitive 33) · ×1
  • middleware.createSessionFromMagicLink (cognitive 33) ghost/core/core/server/services/members/middleware.js:415 — middleware.createSessionFromMagicLink has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 10, error handling 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). Of this number, 28 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleDataAttributes (cognitive 33) · ×1
  • handleDataAttributes (cognitive 33) apps/portal/src/data-attributes.js:227 — handleDataAttributes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26 (30 pts), error handling 2, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 33 function items inside it that branch ((anonymous)::clickHandler::(anonymous), (anonymous)::clickHandler::(anonymous), (anonymous), …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · web.Web (cognitive 32) · ×1
  • web.Web (cognitive 32) apps/admin/src/posts/analytics/web/web.tsx:45 — web.Web has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, if/else 10, ternaries 5 (7 pts) (nesting depth added 2). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 105, 157, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · theme-modal.ChangeThemeModal (cognitive 32) · ×1
  • theme-modal.ChangeThemeModal (cognitive 32) apps/admin/src/settings/site/theme-modal.tsx:317 — theme-modal.ChangeThemeModal has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 7, error handling 2 (5 pts) (nesting depth added 12). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 345, 392, 490, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tier-checkout-collection.TierCheckoutCollection (cognitive 32) · ×1
  • tier-checkout-collection.TierCheckoutCollection (cognitive 32) apps/admin/src/settings/membership/tiers/tier-checkout-collection.tsx:278 — tier-checkout-collection.TierCheckoutCollection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 11, ternaries 4 (6 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 381, 320, 326, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · paid-account-actions.PaidAccountActions (cognitive 32) · ×1
  • paid-account-actions.PaidAccountActions (cognitive 32) apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.jsx:21 — paid-account-actions.PaidAccountActions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 12, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 38, 109, 183, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · data-attributes.formSubmitHandler (cognitive 32) · ×1
  • data-attributes.formSubmitHandler (cognitive 32) apps/portal/src/data-attributes.js:18 — data-attributes.formSubmitHandler has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, error handling 3 (7 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · multi-select-combobox.MultiSelectCombobox (cognitive 32) · ×1
  • multi-select-combobox.MultiSelectCombobox (cognitive 32) apps/shade/src/components/ui/multi-select-combobox.tsx:171 — multi-select-combobox.MultiSelectCombobox has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 12, ternaries 7 (9 pts), if/else 6 (8 pts), loops 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 262, 231, 290, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SettingsImporter.beforeImport (cognitive 32) · ×1
  • SettingsImporter.beforeImport (cognitive 32) ghost/core/core/server/data/importer/importers/data/settings-importer.js:99 — SettingsImporter.beforeImport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, ternaries 1 (4 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 226, 147, 119, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · attachSubscriptionsToMember (cognitive 32) · ×1
  • attachSubscriptionsToMember (cognitive 32) ghost/core/core/server/services/members/members-api/services/member-bread-service.js:121 — attachSubscriptionsToMember has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 14). Of this number, 30 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · note.Note (cognitive 31) · ×1
  • note.Note (cognitive 31) apps/activitypub/src/views/feed/note.tsx:25 — note.Note has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, if/else 11, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 11 of the 31 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 287, 65, 55, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bluesky-sharing.BlueskySharing (cognitive 31) · ×1
  • bluesky-sharing.BlueskySharing (cognitive 31) apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:35 — bluesky-sharing.BlueskySharing has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (9 pts), ternaries 5 (9 pts), error handling 1 (2 pts) (nesting depth added 6). Of this number, 19 points are the body's own statements and 12 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · overview.Overview (cognitive 31) · ×1
  • overview.Overview (cognitive 31) apps/admin/src/posts/analytics/overview/overview.tsx:51 — overview.Overview has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 26, if/else 5. Of this number, 24 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · edit-offer-modal.EditOfferModal (cognitive 31) · ×1
  • edit-offer-modal.EditOfferModal (cognitive 31) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:281 — edit-offer-modal.EditOfferModal has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 16, if/else 6 (11 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 345, 393, 308). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · publication-language.PublicationLanguage (cognitive 31) · ×1
  • publication-language.PublicationLanguage (cognitive 31) apps/admin/src/settings/general/publication-language.tsx:33 — publication-language.PublicationLanguage has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, ternaries 5 (9 pts), if/else 7 (8 pts) (nesting depth added 5). Of this number, 19 points are the body's own statements and 12 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · access.Access (cognitive 31) · ×1
  • access.Access (cognitive 31) apps/admin/src/settings/membership/access.tsx:135 — access.Access has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 23, ternaries 5, if/else 2, error handling 1. Of this number, 27 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ParseMemberEventHelper.getIcon (cognitive 31) · ×1
  • ParseMemberEventHelper.getIcon (cognitive 31) apps/ember-admin/app/helpers/parse-member-event.js:70 — ParseMemberEventHelper.getIcon has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25 (28 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · gift-redemption-page.GiftRedemptionPage (cognitive 31) · ×1
  • gift-redemption-page.GiftRedemptionPage (cognitive 31) apps/portal/src/components/pages/gift-redemption-page.jsx:58 — gift-redemption-page.GiftRedemptionPage has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 19, if/else 9 (10 pts), ternaries 2 (nesting depth added 1). Of this number, 20 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · members-api.MembersAPI (cognitive 31) · ×1
  • members-api.MembersAPI (cognitive 31) ghost/core/core/server/services/members/members-api/members-api.js:25 — members-api.MembersAPI has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2 (nesting depth added 4). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · get.get (cognitive 31) · ×1
  • get.get (cognitive 31) ghost/core/core/frontend/helpers/get.js:405 — get.get has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10, error handling 2 (4 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DockerAnalyticsManager.generateSession (cognitive 31) · ×1
  • DockerAnalyticsManager.generateSession (cognitive 31) ghost/core/core/server/data/tinybird/scripts/docker-analytics-manager.js:555 — DockerAnalyticsManager.generateSession has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 3 (6 pts), boolean chains 5, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bulkEdit (cognitive 31) · ×1
  • bulkEdit (cognitive 31) ghost/core/core/server/services/posts/posts-service.js:120 — bulkEdit has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 12). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · actions.getLinkTarget (cognitive 30) · ×1
  • actions.getLinkTarget (cognitive 30) apps/admin-x-framework/src/api/actions.ts:130 — actions.getLinkTarget has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-growth-stats.useGrowthStats (cognitive 30) · ×1
  • use-growth-stats.useGrowthStats (cognitive 30) apps/admin/src/analytics/hooks/use-growth-stats.ts:223 — use-growth-stats.useGrowthStats has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, ternaries 3 (4 pts), loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 289, 250, 389, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · newsletter-overview.NewsletterOverview (cognitive 30) · ×1
  • newsletter-overview.NewsletterOverview (cognitive 30) apps/admin/src/posts/analytics/overview/components/newsletter-overview.tsx:41 — newsletter-overview.NewsletterOverview has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 12 (nesting depth added 9). Of this number, 18 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · member-value-semantics.subscriptionSemantics (cognitive 30) · ×1
  • member-value-semantics.subscriptionSemantics (cognitive 30) apps/admin/src/members/member-value-semantics.ts:12 — member-value-semantics.subscriptionSemantics has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 5 (9 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · get-portal-preview-url.getPortalPreviewUrl (cognitive 30) · ×1
  • get-portal-preview-url.getPortalPreviewUrl (cognitive 30) apps/admin/src/settings/utils/get-portal-preview-url.ts:19 — get-portal-preview-url.getPortalPreviewUrl has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, ternaries 9, if/else 6. Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · validator.validateSchema (cognitive 30) · ×1
  • validator.validateSchema (cognitive 30) ghost/core/core/server/data/schema/validator.ts:43 — validator.validateSchema has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7 (nesting depth added 10). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 49). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · clean.post (cognitive 30) · ×1
  • clean.post (cognitive 30) ghost/core/core/server/api/endpoints/utils/serializers/output/utils/clean.js:81 — clean.post has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 7 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NewslettersService.prepAttrsForEmailVerification (cognitive 30) · ×1
  • NewslettersService.prepAttrsForEmailVerification (cognitive 30) ghost/core/core/server/services/newsletters/newsletters-service.js:289 — NewslettersService.prepAttrsForEmailVerification has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 8, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extra-attrs.forPost (cognitive 30) · ×1
  • extra-attrs.forPost (cognitive 30) ghost/core/core/server/api/endpoints/utils/serializers/output/utils/extra-attrs.js:10 — extra-attrs.forPost has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clean-basic-html.cleanBasicHtml (cognitive 30) · ×1
  • clean-basic-html.cleanBasicHtml (cognitive 30) koenig/kg-clean-basic-html/src/clean-basic-html.ts:12 — clean-basic-html.cleanBasicHtml has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8 (nesting depth added 10). Of this number, 16 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #runARRQueries (cognitive 30) · ×1
  • #runARRQueries (cognitive 30) ghost/core/core/server/services/milestones/milestones-service.js:197 — #runARRQueries has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 7, loops 1 (4 pts) (nesting depth added 15). Of this number, 29 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · email-sending-status-provider.EmailSendingStatusProvider (cognitive 29) · ×1
  • email-sending-status-provider.EmailSendingStatusProvider (cognitive 29) apps/admin/src/posts/analytics/email-sending-status/email-sending-status-provider.tsx:25 — email-sending-status-provider.EmailSendingStatusProvider has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 6, ternaries 3 (5 pts), error handling 1 (nesting depth added 2). Of this number, 18 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · activity-email-preview.ActivityEmailPreview (cognitive 29) · ×1
  • activity-email-preview.ActivityEmailPreview (cognitive 29) apps/admin/src/members/activity/activity-email-preview.tsx:31 — activity-email-preview.ActivityEmailPreview has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 12, if/else 3 (nesting depth added 6). Of this number, 23 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.fetchOfferQueryStrData (cognitive 29) · ×1
  • App.fetchOfferQueryStrData (cognitive 29) REDACTED:434 — App.fetchOfferQueryStrData has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 13, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · commands.addTableColumn (cognitive 29) · ×1
  • commands.addTableColumn (cognitive 29) ghost/core/core/server/data/schema/commands.js:22 — commands.addTableColumn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 10 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GiftDeliveryService.send (cognitive 29) · ×1
  • GiftDeliveryService.send (cognitive 29) ghost/core/core/server/services/gifts/gift-delivery-service.ts:229 — GiftDeliveryService.send has cognitive complexity 29 (threshold 15). Drivers by points: error handling 7 (12 pts), if/else 10, boolean chains 5, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · route-settings-parser.parseDataEntry (cognitive 29) · ×1
  • route-settings-parser.parseDataEntry (cognitive 29) ghost/core/core/server/services/route-settings/route-settings-parser.ts:127 — route-settings-parser.parseDataEntry has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TableImporter.batchInsert (cognitive 29) · ×1
  • TableImporter.batchInsert (cognitive 29) ghost/core/core/server/data/seeders/importers/table-importer.ts:101 — TableImporter.batchInsert has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (9 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-post-selection.usePostSelection (cognitive 28) · ×1
  • use-post-selection.usePostSelection (cognitive 28) apps/admin/src/posts/list/hooks/use-post-selection.ts:46 — use-post-selection.usePostSelection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, boolean chains 9, ternaries 1. Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 86, 181, 212, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-editor-session.useEditorSession (cognitive 28) · ×1
  • use-editor-session.useEditorSession (cognitive 28) apps/admin/src/editor/session/use-editor-session.ts:164 — use-editor-session.useEditorSession has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 10, boolean chains 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 323, 311, 378, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · manage-view-popover.ManageViewPopoverContent (cognitive 28) · ×1
  • manage-view-popover.ManageViewPopoverContent (cognitive 28) apps/admin/src/members/components/manage-view-popover.tsx:21 — manage-view-popover.ManageViewPopoverContent has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 6 (7 pts), boolean chains 3, error handling 2 (nesting depth added 9). Of this number, 15 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · history-modal.HistoryActionDescription (cognitive 28) · ×1
  • history-modal.HistoryActionDescription (cognitive 28) apps/admin/src/settings/advanced/history-modal.tsx:341 — history-modal.HistoryActionDescription has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 6 (7 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edit-offer-modal.Sidebar (cognitive 28) · ×1
  • edit-offer-modal.Sidebar (cognitive 28) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:53 — edit-offer-modal.Sidebar has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 13, ternaries 8, error handling 2 (4 pts), if/else 3 (nesting depth added 2). Of this number, 21 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · mapping-step.MappingStep (cognitive 28) · ×1
  • mapping-step.MappingStep (cognitive 28) apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:46 — mapping-step.MappingStep has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, ternaries 7 (13 pts) (nesting depth added 6). Of this number, 20 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · member-emails.MemberEmails (cognitive 28) · ×1
  • member-emails.MemberEmails (cognitive 28) apps/admin/src/settings/membership/member-emails.tsx:171 — member-emails.MemberEmails has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, error handling 3 (4 pts), ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 300, 272, 227, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · date.dateSemantics (cognitive 28) · ×1
  • date.dateSemantics (cognitive 28) apps/admin/src/shared/filters/semantics/date.ts:107 — date.dateSemantics has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, ternaries 4 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · filters.FilterInput (cognitive 28) · ×1
  • filters.FilterInput (cognitive 28) apps/shade/src/components/patterns/filters.tsx:545 — filters.FilterInput has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (10 pts), ternaries 2 (3 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 602, 577, 637, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Offer.create (cognitive 28) · ×1
  • Offer.create (cognitive 28) ghost/core/core/server/services/offers/domain/models/offer.js:288 — Offer.create has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · database-automations-repository.createDatabaseAutomationsRepository (cognitive 28) · ×1
  • database-automations-repository.createDatabaseAutomationsRepository (cognitive 28) ghost/core/core/server/services/automations/database-automations-repository.ts:156 — database-automations-repository.createDatabaseAutomationsRepository has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 3, boolean chains 2, ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 333, 397, 227, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Base.replaceIdentifiers (cognitive 28) · ×1
  • Base.replaceIdentifiers (cognitive 28) ghost/core/core/server/data/importer/importers/data/base.js:186 — Base.replaceIdentifiers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 195, 187). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · post-data.buildPostData (cognitive 28) · ×1
  • post-data.buildPostData (cognitive 28) ghost/core/core/server/services/content-import/import/post-data.ts:82 — post-data.buildPostData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 3 (7 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · tinybird.create (cognitive 28) · ×1
  • tinybird.create (cognitive 28) ghost/core/core/server/services/stats/utils/tinybird.js:12 — tinybird.create has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (16 pts), error handling 3 (6 pts), boolean chains 3, ternaries 3 (nesting depth added 5). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 113, 25, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mobiledoc-to-lexical.populateLexicalNodeWithMarkers (cognitive 28) · ×1
  • mobiledoc-to-lexical.populateLexicalNodeWithMarkers (cognitive 28) koenig/kg-converters/src/mobiledoc-to-lexical.ts:226 — mobiledoc-to-lexical.populateLexicalNodeWithMarkers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 13). Of this number, 18 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #run (cognitive 28) · ×1
  • #run (cognitive 28) ghost/core/core/server/data/seeders/data-generator.js:242 — #run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 4 (5 pts), error handling 1 (2 pts), other 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post-list-row.PostListRowComponent (cognitive 27) · ×1
  • post-list-row.PostListRowComponent (cognitive 27) apps/admin/src/posts/list/components/post-list-row.tsx:124 — post-list-row.PostListRowComponent has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 18 (20 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · options-step.OptionsStep (cognitive 27) · ×1
  • options-step.OptionsStep (cognitive 27) apps/admin/src/editor/publish/components/options-step.tsx:79 — options-step.OptionsStep has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 14 (19 pts), boolean chains 8 (nesting depth added 5). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · email-confirmation.createEmailConfirmation (cognitive 27) · ×1
  • email-confirmation.createEmailConfirmation (cognitive 27) apps/admin/src/editor/publish/email-confirmation.ts:56 — email-confirmation.createEmailConfirmation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 3, loops 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editor-header-actions.PublishActions (cognitive 27) · ×1
  • editor-header-actions.PublishActions (cognitive 27) apps/admin/src/editor/editor-header-actions.tsx:172 — editor-header-actions.PublishActions has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (20 pts), boolean chains 5, if/else 2 (nesting depth added 10). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stripe-connect-modal.Connect (cognitive 27) · ×1
  • stripe-connect-modal.Connect (cognitive 27) apps/admin/src/settings/membership/stripe/stripe-connect-modal.tsx:70 — stripe-connect-modal.Connect has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, error handling 2 (5 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 9). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 89, 122). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · add-offer-modal.Sidebar (cognitive 27) · ×1
  • add-offer-modal.Sidebar (cognitive 27) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:131 — add-offer-modal.Sidebar has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 21, ternaries 5, if/else 1. Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · welcome-email-modal.WelcomeEmailModal (cognitive 27) · ×1
  • welcome-email-modal.WelcomeEmailModal (cognitive 27) apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:113 — welcome-email-modal.WelcomeEmailModal has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 20, if/else 6, ternaries 1. Of this number, 18 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · App.getPageFromLinkPath (cognitive 27) · ×1
  • App.getPageFromLinkPath (cognitive 27) REDACTED:1169 — App.getPageFromLinkPath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25 (26 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · chart.ChartTooltipContent (cognitive 27) · ×1
  • chart.ChartTooltipContent (cognitive 27) REDACTED:108 — chart.ChartTooltipContent has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, ternaries 6 (9 pts), if/else 4 (nesting depth added 3). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 170, 128). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · markdown.renderEntryMarkdown (cognitive 27) · ×1
  • markdown.renderEntryMarkdown (cognitive 27) ghost/core/core/frontend/services/llms/markdown.js:152 — markdown.renderEntryMarkdown has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 6 (9 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · newsletter-filter-fields.newsletterAddressing (cognitive 26) · ×1
  • newsletter-filter-fields.newsletterAddressing (cognitive 26) apps/admin/src/members/newsletter-filter-fields.ts:54 — newsletter-filter-fields.newsletterAddressing has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 5, ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · preview-frame.EmailPreviewFrame (cognitive 26) · ×1
  • preview-frame.EmailPreviewFrame (cognitive 26) apps/admin/src/automations/components/email-modal/preview-frame.tsx:10 — preview-frame.EmailPreviewFrame has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · use-post-newsletter-stats.usePostNewsletterStats (cognitive 26) · ×1
  • use-post-newsletter-stats.usePostNewsletterStats (cognitive 26) apps/admin/src/posts/analytics/hooks/use-post-newsletter-stats.ts:19 — use-post-newsletter-stats.usePostNewsletterStats has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 16, if/else 6, ternaries 4. Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 40, 64, 159, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · preview-modal.PreviewModalContent (cognitive 26) · ×1
  • preview-modal.PreviewModalContent (cognitive 26) apps/admin/src/settings/components/preview-modal.tsx:91 — preview-modal.PreviewModalContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12, ternaries 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · welcome-email-preview-frame.WelcomeEmailPreviewFrame (cognitive 26) · ×1
  • welcome-email-preview-frame.WelcomeEmailPreviewFrame (cognitive 26) apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:10 — welcome-email-preview-frame.WelcomeEmailPreviewFrame has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · use-scroll-restoration.useScrollRestoration (cognitive 26) · ×1
  • use-scroll-restoration.useScrollRestoration (cognitive 26) apps/admin/src/shared/virtual-list/use-scroll-restoration.tsx:116 — use-scroll-restoration.useScrollRestoration has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 0 of the 26 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 242, 280, 177, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · gift-success-page.GiftSuccessPage (cognitive 26) · ×1
  • gift-success-page.GiftSuccessPage (cognitive 26) apps/portal/src/components/pages/gift-success-page.jsx:139 — gift-success-page.GiftSuccessPage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 10, if/else 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopupContent.render (cognitive 26) · ×1
  • PopupContent.render (cognitive 26) REDACTED:156 — PopupContent.render has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts), match/switch 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · EmailAddressService.getAddress (cognitive 26) · ×1
  • EmailAddressService.getAddress (cognitive 26) REDACTED:104 — EmailAddressService.getAddress has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinkReplacer.replace (cognitive 26) · ×1
  • LinkReplacer.replace (cognitive 26) ghost/core/core/server/services/lib/link-replacer.js:10 — LinkReplacer.replace has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProductRepository.create (cognitive 26) · ×1
  • ProductRepository.create (cognitive 26) ghost/core/core/server/services/members/members-api/repositories/product-repository.js:174 — ProductRepository.create has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OEmbedService.fetchOembedData (cognitive 26) · ×1
  • OEmbedService.fetchOembedData (cognitive 26) ghost/core/core/server/services/oembed/oembed-service.js:666 — OEmbedService.fetchOembedData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 8, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · body_class.body_class (cognitive 26) · ×1
  • body_class.body_class (cognitive 26) ghost/core/core/frontend/helpers/body_class.js:19 — body_class.body_class has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Frame.configure (cognitive 26) · ×1
  • Frame.configure (cognitive 26) packages/api-framework/lib/Frame.js:47 — Frame.configure has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release.waitForChecks (cognitive 26) · ×1
  • release.waitForChecks (cognitive 26) scripts/release.js:226 — release.waitForChecks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add (cognitive 26) · ×1
  • add (cognitive 26) ghost/core/core/server/services/members/members-api/services/member-bread-service.js:470 — add has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, error handling 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · querySimplePath (cognitive 26) · ×1
  • querySimplePath (cognitive 26) ghost/core/core/frontend/helpers/get.js:93 — querySimplePath has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (10 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). Of this number, 19 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-activity-pub-queries.useReplyChainForUser (cognitive 25) · ×1
  • use-activity-pub-queries.useReplyChainForUser (cognitive 25) apps/activitypub/src/hooks/use-activity-pub-queries.ts:2551 — use-activity-pub-queries.useReplyChainForUser has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 4 (7 pts), error handling 4, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 2590, 2618, 2648, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · suggested-profiles.SuggestedProfiles (cognitive 25) · ×1
  • suggested-profiles.SuggestedProfiles (cognitive 25) apps/activitypub/src/views/feed/components/suggested-profiles.tsx:12 — suggested-profiles.SuggestedProfiles has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, ternaries 5, if/else 4. Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 130, 25, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · handle-response.handleResponse (cognitive 25) · ×1
  • handle-response.handleResponse (cognitive 25) apps/admin-x-framework/src/utils/api/handle-response.ts:26 — handle-response.handleResponse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · growth-sources.GrowthSources (cognitive 25) · ×1
  • growth-sources.GrowthSources (cognitive 25) apps/admin/src/analytics/views/stats/growth/components/growth-sources.tsx:111 — growth-sources.GrowthSources has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 5 (7 pts), loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 141, 168, 161). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · email-preview.EmailPreview (cognitive 25) · ×1
  • email-preview.EmailPreview (cognitive 25) apps/admin/src/editor/preview/email-preview.tsx:83 — email-preview.EmailPreview has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (20 pts), boolean chains 5 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · addressing.customFieldAddressing (cognitive 25) · ×1
  • addressing.customFieldAddressing (cognitive 25) apps/admin/src/members/custom-fields/addressing.ts:84 — addressing.customFieldAddressing has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, loops 1 (nesting depth added 8). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · design-modal.DesignModal (cognitive 25) · ×1
  • design-modal.DesignModal (cognitive 25) apps/admin/src/settings/site/design-modal.tsx:80 — design-modal.DesignModal has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9, ternaries 8 (9 pts), boolean chains 7 (nesting depth added 1). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 174, 162, 186, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-pintura-editor.usePinturaEditor (cognitive 25) · ×1
  • use-pintura-editor.usePinturaEditor (cognitive 25) apps/admin/src/settings/hooks/use-pintura-editor.ts:49 — use-pintura-editor.usePinturaEditor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 6, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 108, 66, 147, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · platform-validator.createPlatformValidator (cognitive 25) · ×1
  • platform-validator.createPlatformValidator (cognitive 25) apps/admin/src/settings/utils/social-urls/platform-validator.ts:153 — platform-validator.createPlatformValidator has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, ternaries 6 (7 pts), boolean chains 6, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 234, 284, 211, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GhKoenigEditorLexical.onTitleKeydown (cognitive 25) · ×1
  • GhKoenigEditorLexical.onTitleKeydown (cognitive 25) apps/ember-admin/app/components/gh-koenig-editor-lexical.js:116 — GhKoenigEditorLexical.onTitleKeydown has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 8 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · filter.createMetafieldsFilterTransformer (cognitive 25) · ×1
  • filter.createMetafieldsFilterTransformer (cognitive 25) ghost/core/core/server/services/members-metafields/filter.ts:100 — filter.createMetafieldsFilterTransformer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BookshelfPostRelationsResolver.resolveAuthors (cognitive 25) · ×1
  • BookshelfPostRelationsResolver.resolveAuthors (cognitive 25) ghost/core/core/server/services/content-import/import/relations.ts:85 — BookshelfPostRelationsResolver.resolveAuthors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2, loops 1 (nesting depth added 12). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handle-image-sizes.handleImageSizes (cognitive 25) · ×1
  • handle-image-sizes.handleImageSizes (cognitive 25) ghost/core/core/frontend/web/middleware/handle-image-sizes.js:16 — handle-image-sizes.handleImageSizes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 15 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · check-internal-packages.checkInternalPackages (cognitive 25) · ×1
  • check-internal-packages.checkInternalPackages (cognitive 25) scripts/check-internal-packages.js:372 — check-internal-packages.checkInternalPackages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 3 (4 pts), boolean chains 3, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _createSubscriptionCheckoutSession (cognitive 25) · ×1
  • _createSubscriptionCheckoutSession (cognitive 25) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:547 — _createSubscriptionCheckoutSession has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, error handling 2 (5 pts), other 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retryDb (cognitive 25) · ×1
  • retryDb (cognitive 25) ghost/core/core/server/services/email-service/batch-sending-service.js:1031 — retryDb has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (7 pts), boolean chains 4, other 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · get (cognitive 25) · ×1
  • get (cognitive 25) ghost/core/core/server/adapters/lib/redis/AdapterCacheRedis.js:273 — get has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 5 (10 pts), boolean chains 1, ternaries 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 2 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · web.Web (cognitive 24) · ×1
  • web.Web (cognitive 24) apps/admin/src/analytics/views/stats/web/web.tsx:26 — web.Web has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, ternaries 3 (4 pts) (nesting depth added 4). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 64, 52, 103, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · new-subscribers-cadence.NewSubscribersCadence (cognitive 24) · ×1
  • new-subscribers-cadence.NewSubscribersCadence (cognitive 24) apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:65 — new-subscribers-cadence.NewSubscribersCadence has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 345, 113, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · newsletters.Newsletters (cognitive 24) · ×1
  • newsletters.Newsletters (cognitive 24) apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx:287 — newsletters.Newsletters has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, if/else 6, loops 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 368, 334, 342, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · feedback.Feedback (cognitive 24) · ×1
  • feedback.Feedback (cognitive 24) apps/admin/src/posts/analytics/newsletter/components/feedback.tsx:45 — feedback.Feedback has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (19 pts), boolean chains 5 (nesting depth added 12). Of this number, 23 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · editor-screen.EditorLoader (cognitive 24) · ×1
  • editor-screen.EditorLoader (cognitive 24) apps/admin/src/editor/editor-screen.tsx:325 — editor-screen.EditorLoader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, ternaries 4 (5 pts) (nesting depth added 3). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · members-actions.MembersActions (cognitive 24) · ×1
  • members-actions.MembersActions (cognitive 24) apps/admin/src/members/components/members-actions.tsx:40 — members-actions.MembersActions has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (7 pts), boolean chains 5, if/else 5, ternaries 4 (5 pts), loops 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 136, 86, 111, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · member-event.getIcon (cognitive 24) · ×1
  • member-event.getIcon (cognitive 24) apps/admin/src/members/detail/member-event.ts:125 — member-event.getIcon has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · comments-list.CommentsList (cognitive 24) · ×1
  • comments-list.CommentsList (cognitive 24) apps/admin/src/comments/components/comments-list.tsx:43 — comments-list.CommentsList has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (8 pts), ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 127, 88, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tier-detail-preview.TierDetailPreview (cognitive 24) · ×1
  • tier-detail-preview.TierDetailPreview (cognitive 24) apps/admin/src/settings/membership/tiers/tier-detail-preview.tsx:81 — tier-detail-preview.TierDetailPreview has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 17, ternaries 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · embed-signup-sidebar.EmbedSignupSidebar (cognitive 24) · ×1
  • embed-signup-sidebar.EmbedSignupSidebar (cognitive 24) apps/admin/src/settings/growth/embed-signup/embed-signup-sidebar.tsx:45 — embed-signup-sidebar.EmbedSignupSidebar has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 73, 97, 146, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · edit-retention-offer-modal.RetentionOfferSidebar (cognitive 24) · ×1
  • edit-retention-offer-modal.RetentionOfferSidebar (cognitive 24) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:253 — edit-retention-offer-modal.RetentionOfferSidebar has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 19, ternaries 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · yaml-file-editor-modal.YamlFileEditorModal (cognitive 24) · ×1
  • yaml-file-editor-modal.YamlFileEditorModal (cognitive 24) apps/admin/src/settings/advanced/labs/yaml-file-editor-modal.tsx:34 — yaml-file-editor-modal.YamlFileEditorModal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), ternaries 2 (4 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 61, 95, 119). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · default-recipients.DefaultRecipients (cognitive 24) · ×1
  • default-recipients.DefaultRecipients (cognitive 24) apps/admin/src/settings/email/default-recipients.tsx:83 — default-recipients.DefaultRecipients has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, boolean chains 4, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 148, 174, 194, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · actions.updateCommentLikeState (cognitive 24) · ×1
  • actions.updateCommentLikeState (cognitive 24) apps/comments-ui/src/actions.ts:294 — actions.updateCommentLikeState has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 8). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 312, 311). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SigninController.authenticateTask (cognitive 24) · ×1
  • SigninController.authenticateTask (cognitive 24) REDACTED:53 — SigninController.authenticateTask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ajaxService._makeRequest (cognitive 24) · ×1
  • ajaxService._makeRequest (cognitive 24) apps/ember-admin/app/services/ajax.js:253 — ajaxService._makeRequest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 7). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · get-discount-window.getDiscountWindow (cognitive 24) · ×1
  • get-discount-window.getDiscountWindow (cognitive 24) ghost/core/core/server/services/members/members-api/utils/get-discount-window.ts:71 — get-discount-window.getDiscountWindow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BookshelfPostRelationsResolver.resolveTags (cognitive 24) · ×1
  • BookshelfPostRelationsResolver.resolveTags (cognitive 24) ghost/core/core/server/services/content-import/import/relations.ts:156 — BookshelfPostRelationsResolver.resolveTags has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmailAnalyticsService.#fetchEventsForJob (cognitive 24) · ×1
  • EmailAnalyticsService.#fetchEventsForJob (cognitive 24) ghost/core/core/server/services/email-analytics/email-analytics-service.ts:447 — EmailAnalyticsService.#fetchEventsForJob has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, error handling 3 (nesting depth added 3). Of this number, 19 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · context.setResponseContext (cognitive 24) · ×1
  • context.setResponseContext (cognitive 24) ghost/core/core/frontend/services/rendering/context.js:19 — context.setResponseContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · unsubscribe.unsubscribeController (cognitive 24) · ×1
  • unsubscribe.unsubscribeController (cognitive 24) ghost/core/core/frontend/services/routing/controllers/unsubscribe.js:10 — unsubscribe.unsubscribeController has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 1 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlackPingService.ping (cognitive 24) · ×1
  • SlackPingService.ping (cognitive 24) ghost/core/core/server/services/slack-ping/slack-ping-service.ts:127 — SlackPingService.ping has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (5 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · defaultRelations (cognitive 24) · ×1
  • defaultRelations (cognitive 24) ghost/core/core/server/models/comment.js:254 — defaultRelations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · history-modal.HistoryFilter (cognitive 23) · ×1
  • history-modal.HistoryFilter (cognitive 23) apps/admin/src/settings/advanced/history-modal.tsx:99 — history-modal.HistoryFilter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 116, 133, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · format-url.formatUrl (cognitive 23) · ×1
  • format-url.formatUrl (cognitive 23) apps/admin/src/settings/utils/format-url.ts:3 — format-url.formatUrl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · filter-addressing.composeCodec (cognitive 23) · ×1
  • filter-addressing.composeCodec (cognitive 23) apps/admin/src/shared/filters/filter-addressing.ts:136 — filter-addressing.composeCodec has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 204, 188). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · actions.updateCommentDislikeState (cognitive 23) · ×1
  • actions.updateCommentDislikeState (cognitive 23) apps/comments-ui/src/actions.ts:392 — actions.updateCommentDislikeState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7 (nesting depth added 6). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 420, 419, 408). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PublishFlowCompleteWithEmailError.retryEmailTask (cognitive 23) · ×1
  • PublishFlowCompleteWithEmailError.retryEmailTask (cognitive 23) apps/ember-admin/app/components/editor/modals/publish-flow/complete-with-email-error.js:29 — PublishFlowCompleteWithEmailError.retryEmailTask has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · members.mockMembers (cognitive 23) · ×1
  • members.mockMembers (cognitive 23) apps/ember-admin/mirage/config/members.js:75 — members.mockMembers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, error handling 2 (4 pts) (nesting depth added 4). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 81, 278, 149, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · pagemenu.PageMenu (cognitive 23) · ×1
  • pagemenu.PageMenu (cognitive 23) apps/shade/src/components/ui/pagemenu.tsx:29 — pagemenu.PageMenu has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 3). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 45, 38, 100, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · email-design.getEmailDesign (cognitive 23) · ×1
  • email-design.getEmailDesign (cognitive 23) ghost/core/core/server/services/email-rendering/email-design.js:71 — email-design.getEmailDesign has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, ternaries 6, match/switch 4, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EmailRenderer.buildReplacementDefinitions (cognitive 23) · ×1
  • EmailRenderer.buildReplacementDefinitions (cognitive 23) ghost/core/core/server/services/email-service/email-renderer.js:962 — EmailRenderer.buildReplacementDefinitions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (5 pts), loops 3, boolean chains 2 (nesting depth added 9). Of this number, 19 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MppAdapter.#run (cognitive 23) · ×1
  • MppAdapter.#run (cognitive 23) ghost/core/core/server/services/machine-payments/adapters/mpp-adapter.ts:141 — MppAdapter.#run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, ternaries 5, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · video.handleVideoPlayer (cognitive 23) · ×1
  • video.handleVideoPlayer (cognitive 23) ghost/core/core/frontend/src/cards/js/video.js:2 — video.handleVideoPlayer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 143, 56, 109, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · comment-counts.renderCounts (cognitive 23) · ×1
  • comment-counts.renderCounts (cognitive 23) ghost/core/core/frontend/src/comment-counts/comment-counts.js:26 — comment-counts.renderCounts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 29). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · prune.prune (cognitive 23) · ×1
  • prune.prune (cognitive 23) ghost/core/scripts/prune.mts:191 — prune.prune has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · getMemberStatusText (cognitive 23) · ×1
  • getMemberStatusText (cognitive 23) ghost/core/core/server/services/email-service/email-renderer.js:883 — getMemberStatusText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, other 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · limitImageWidth (cognitive 23) · ×1
  • limitImageWidth (cognitive 23) ghost/core/core/server/services/email-service/email-renderer.js:1552 — limitImageWidth has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onSaving (cognitive 23) · ×1
  • onSaving (cognitive 23) ghost/core/core/server/models/user.js:227 — onSaving has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6 (nesting depth added 7). Of this number, 19 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _setAttributionMetadata (cognitive 23) · ×1
  • _setAttributionMetadata (cognitive 23) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:348 — _setAttributionMetadata has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (23 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edit (cognitive 23) · ×1
  • edit (cognitive 23) ghost/core/core/server/services/members/members-api/services/member-bread-service.js:571 — edit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getAdminToolbarHelper (cognitive 23) · ×1
  • getAdminToolbarHelper (cognitive 23) ghost/core/core/frontend/helpers/ghost_head.js:234 — getAdminToolbarHelper has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, ternaries 9 (10 pts), if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · use-keyboard-shortcuts.useKeyboardShortcuts (cognitive 22) · ×1
  • use-keyboard-shortcuts.useKeyboardShortcuts (cognitive 22) apps/activitypub/src/hooks/use-keyboard-shortcuts.tsx:11 — use-keyboard-shortcuts.useKeyboardShortcuts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 16). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · email-recipients-options.EmailRecipientsOptions (cognitive 22) · ×1
  • email-recipients-options.EmailRecipientsOptions (cognitive 22) apps/admin/src/editor/publish/components/email-recipients-options.tsx:36 — email-recipients-options.EmailRecipientsOptions has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (8 pts), if/else 3 (nesting depth added 1). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 109, 93, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · add-recommendation-modal.AddRecommendationModal (cognitive 22) · ×1
  • add-recommendation-modal.AddRecommendationModal (cognitive 22) apps/admin/src/settings/growth/recommendations/add-recommendation-modal.tsx:44 — add-recommendation-modal.AddRecommendationModal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 6, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 130, 74, 156, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · api.setupGhostApi (cognitive 22) · ×1
  • api.setupGhostApi (cognitive 22) apps/portal/src/utils/api.js:4 — api.setupGhostApi has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 18, if/else 4. Of this number, 20 points are the body's own statements and 2 belong to 29 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PostsImporter.beforeImport (cognitive 22) · ×1
  • PostsImporter.beforeImport (cognitive 22) ghost/core/core/server/data/importer/importers/data/posts-importer.js:247 — PostsImporter.beforeImport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 253, 290, 321). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · NewsletterEmailAnalyticsBatchProcessor.#processEvent (cognitive 22) · ×1
  • NewsletterEmailAnalyticsBatchProcessor.#processEvent (cognitive 22) ghost/core/core/server/services/email-analytics/newsletter-email-analytics-batch-processor.js:122 — NewsletterEmailAnalyticsBatchProcessor.#processEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (22 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image-dimensions.getImageDimensions (cognitive 22) · ×1
  • image-dimensions.getImageDimensions (cognitive 22) ghost/core/core/frontend/meta/image-dimensions.js:13 — image-dimensions.getImageDimensions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3 (nesting depth added 10). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 40). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · navigation.navigation (cognitive 22) · ×1
  • navigation.navigation (cognitive 22) ghost/core/core/frontend/helpers/navigation.js:98 — navigation.navigation has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 3. Of this number, 16 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · error-handler.themeErrorRenderer (cognitive 22) · ×1
  • error-handler.themeErrorRenderer (cognitive 22) ghost/core/core/frontend/web/middleware/error-handler.js:46 — error-handler.themeErrorRenderer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (nesting depth added 4). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · poll.processStep (cognitive 22) · ×1
  • poll.processStep (cognitive 22) ghost/core/core/server/services/automations/poll.ts:129 — poll.processStep has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (6 pts), ternaries 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · http.http (cognitive 22) · ×1
  • http.http (cognitive 22) REDACTED:16 — http.http has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 23, 96). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · all.validate (cognitive 22) · ×1
  • all.validate (cognitive 22) packages/api-framework/lib/validators/input/all.js:33 — all.validate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 11). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 49, 36). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · setComplimentarySubscription (cognitive 22) · ×1
  • setComplimentarySubscription (cognitive 22) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:2457 — setComplimentarySubscription has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). Of this number, 19 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getSubscriptionCheckoutData (cognitive 22) · ×1
  • _getSubscriptionCheckoutData (cognitive 22) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:422 — _getSubscriptionCheckoutData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-activity-pub-queries.updateLikeCache (cognitive 21) · ×1
  • use-activity-pub-queries.updateLikeCache (cognitive 21) apps/activitypub/src/hooks/use-activity-pub-queries.ts:111 — use-activity-pub-queries.updateLikeCache has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 11). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 132, 122, 156, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · inbox-list.InboxList (cognitive 21) · ×1
  • inbox-list.InboxList (cognitive 21) apps/activitypub/src/views/inbox/components/inbox-list.tsx:34 — inbox-list.InboxList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 59, 182, 105, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · newsletter-radial-chart.NewsletterRadialChart (cognitive 21) · ×1
  • newsletter-radial-chart.NewsletterRadialChart (cognitive 21) apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:26 — newsletter-radial-chart.NewsletterRadialChart has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 7, if/else 3, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 47, 139, 35). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · theme-modal.ThemeToolbar (cognitive 21) · ×1
  • theme-modal.ThemeToolbar (cognitive 21) apps/admin/src/settings/site/theme-modal.tsx:68 — theme-modal.ThemeToolbar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 160, 211, 87, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · webhook-modal.WebhookModal (cognitive 21) · ×1
  • webhook-modal.WebhookModal (cognitive 21) apps/admin/src/settings/advanced/integrations/webhook-modal.tsx:32 — webhook-modal.WebhookModal has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 7, ternaries 2. Of this number, 13 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · use-unsaved-changes-guard.useUnsavedChangesGuard (cognitive 21) · ×1
  • use-unsaved-changes-guard.useUnsavedChangesGuard (cognitive 21) apps/admin/src/hooks/use-unsaved-changes-guard.ts:65 — use-unsaved-changes-guard.useUnsavedChangesGuard has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, boolean chains 7. Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 90, 129, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · custom-field-picker.CreateFieldInline (cognitive 21) · ×1
  • custom-field-picker.CreateFieldInline (cognitive 21) apps/admin/src/shared/member-custom-fields/custom-field-picker.tsx:215 — custom-field-picker.CreateFieldInline has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), ternaries 3 (5 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 236, 284). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · KoenigLexicalEditor.ReactComponent (cognitive 21) · ×1
  • KoenigLexicalEditor.ReactComponent (cognitive 21) apps/ember-admin/app/components/koenig-lexical-editor.js:341 — KoenigLexicalEditor.ReactComponent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 3, error handling 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 431, 484, 415, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MembersCountCacheService.countString (cognitive 21) · ×1
  • MembersCountCacheService.countString (cognitive 21) apps/ember-admin/app/services/members-count-cache.js:34 — MembersCountCacheService.countString has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · input-field.InputField (cognitive 21) · ×1
  • input-field.InputField (cognitive 21) apps/portal/src/components/common/input-field.jsx:179 — input-field.InputField has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 4, if/else 3, match/switch 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · date-picker.DatePicker (cognitive 21) · ×1
  • date-picker.DatePicker (cognitive 21) apps/portal/src/components/common/date-picker.jsx:296 — date-picker.DatePicker has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 4, error handling 1. Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 346, 383, 392, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · BookshelfPostsRepository.write (cognitive 21) · ×1
  • BookshelfPostsRepository.write (cognitive 21) ghost/core/core/server/services/content-import/import/post-repository.ts:52 — BookshelfPostsRepository.write has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · upload.mediaValidation (cognitive 21) · ×1
  • upload.mediaValidation (cognitive 21) ghost/core/core/server/web/api/middleware/upload.js:408 — upload.mediaValidation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9 (nesting depth added 5). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 409). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · resolve.resolve (cognitive 21) · ×1
  • resolve.resolve (cognitive 21) ghost/core/core/server/services/remote-flags/resolve.ts:55 — resolve.resolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · csv.fieldValuesFromCsvRow (cognitive 21) · ×1
  • csv.fieldValuesFromCsvRow (cognitive 21) packages/metafield-types/src/csv.ts:122 — csv.fieldValuesFromCsvRow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyOfferToSubscription (cognitive 21) · ×1
  • applyOfferToSubscription (cognitive 21) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:2224 — applyOfferToSubscription has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · permissible (cognitive 21) · ×1
  • permissible (cognitive 21) ghost/core/core/server/models/post.js:1523 — permissible has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts) (nesting depth added 1). Of this number, 19 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sendBatch (cognitive 21) · ×1
  • sendBatch (cognitive 21) ghost/core/core/server/services/email-service/batch-sending-service.js:777 — sendBatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), other 2, boolean chains 1, error handling 1, ternaries 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getInfo (cognitive 21) · ×1
  • getInfo (cognitive 21) apps/ember-admin/app/helpers/parse-member-event.js:391 — getInfo has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (8 pts), boolean chains 2, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mediaValidation · ×1
  • mediaValidation::mediaUploadValidation (cognitive 21) ghost/core/core/server/web/api/middleware/upload.js:409 — mediaValidation::mediaUploadValidation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model (cognitive 21) · ×1
  • model (cognitive 21) apps/ember-admin/app/routes/posts.js:183 — model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · use-activity-pub-queries.useFollowMutationForUser (cognitive 20) · ×1
  • use-activity-pub-queries.useFollowMutationForUser (cognitive 20) apps/activitypub/src/hooks/use-activity-pub-queries.ts:1231 — use-activity-pub-queries.useFollowMutationForUser has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 3 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1288, 1417, 1251, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · unsubscribe-modal.UnsubscribeModal (cognitive 20) · ×1
  • unsubscribe-modal.UnsubscribeModal (cognitive 20) apps/admin/src/members/components/bulk-action-modals/unsubscribe-modal.tsx:30 — unsubscribe-modal.UnsubscribeModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 belong to 9 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mapping.detectFieldTypes (cognitive 20) · ×1
  • mapping.detectFieldTypes (cognitive 20) apps/admin/src/members/components/bulk-action-modals/import-members/mapping.ts:193 — mapping.detectFieldTypes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · portal-modal.PortalModal (cognitive 20) · ×1
  • portal-modal.PortalModal (cognitive 20) apps/admin/src/settings/membership/portal/portal-modal.tsx:99 — portal-modal.PortalModal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 121, 170, 254, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · history-modal.HistoryModal (cognitive 20) · ×1
  • history-modal.HistoryModal (cognitive 20) apps/admin/src/settings/advanced/history-modal.tsx:423 — history-modal.HistoryModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (9 pts), if/else 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · post-list-row-email-status.PostListRowEmailStatus (cognitive 20) · ×1
  • post-list-row-email-status.PostListRowEmailStatus (cognitive 20) apps/admin/src/posts/list/components/post-list-row-email-status.tsx:22 — post-list-row-email-status.PostListRowEmailStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 3). Of this number, 11 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · export-all-modal.ExportAllModal (cognitive 20) · ×1
  • export-all-modal.ExportAllModal (cognitive 20) apps/admin/src/settings/advanced/migration-tools/export-all-modal.tsx:80 — export-all-modal.ExportAllModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 117, 99, 95, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · color-picker-field.ColorPickerField (cognitive 20) · ×1
  • color-picker-field.ColorPickerField (cognitive 20) apps/admin/src/settings/components/color-picker-field.tsx:63 — color-picker-field.ColorPickerField has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 6. Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 146, 85, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-default-recipients-options.useDefaultRecipientsOptions (cognitive 20) · ×1
  • use-default-recipients-options.useDefaultRecipientsOptions (cognitive 20) apps/admin/src/settings/email/use-default-recipients-options.tsx:32 — use-default-recipients-options.useDefaultRecipientsOptions has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (8 pts), error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 104, 68, 152). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · relative-date-filter.RelativeDateFilter (cognitive 20) · ×1
  • relative-date-filter.RelativeDateFilter (cognitive 20) apps/admin/src/shared/filters/relative-date-filter.tsx:27 — relative-date-filter.RelativeDateFilter has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5 (7 pts), boolean chains 4 (nesting depth added 5). Of this number, 11 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexicalEditorController._hasDirtyAttributes (cognitive 20) · ×1
  • LexicalEditorController._hasDirtyAttributes (cognitive 20) REDACTED:1444 — LexicalEditorController._hasDirtyAttributes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 4 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · share-modal.ShareModal (cognitive 20) · ×1
  • share-modal.ShareModal (cognitive 20) apps/portal/src/components/pages/share/share-modal.jsx:16 — share-modal.ShareModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 4, ternaries 4. Of this number, 14 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · extract-adoption.scanApp (cognitive 20) · ×1
  • extract-adoption.scanApp (cognitive 20) apps/shade/scripts/extract-adoption.ts:124 — extract-adoption.scanApp has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (4 pts), error handling 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · code-editor-view.CodeEditorView (cognitive 20) · ×1
  • code-editor-view.CodeEditorView (cognitive 20) apps/shade/src/components/ui/code-editor-view.tsx:54 — code-editor-view.CodeEditorView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 4. Of this number, 10 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LazyUrlService.getRequiredRelations (cognitive 20) · ×1
  • LazyUrlService.getRequiredRelations (cognitive 20) ghost/core/core/server/services/url/lazy-url-service.ts:259 — LazyUrlService.getRequiredRelations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsBREADService.edit (cognitive 20) · ×1
  • SettingsBREADService.edit (cognitive 20) ghost/core/core/server/services/settings/settings-bread-service.js:201 — SettingsBREADService.edit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4 (nesting depth added 7). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse.parseWithSource (cognitive 20) · ×1
  • parse.parseWithSource (cognitive 20) ghost/core/core/server/services/content-import/csv/parse.ts:52 — parse.parseWithSource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edit (cognitive 20) · ×1
  • edit (cognitive 20) ghost/core/core/server/models/user.js:592 — edit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · feed-item-stats.FeedItemStats (cognitive 19) · ×1
  • feed-item-stats.FeedItemStats (cognitive 19) apps/activitypub/src/components/feed/feed-item-stats.tsx:28 — feed-item-stats.FeedItemStats has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 2. Of this number, 12 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · members.membersCountString (cognitive 19) · ×1
  • members.membersCountString (cognitive 19) apps/admin-x-framework/src/api/members.ts:344 — members.membersCountString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-koenig-file-upload.useKoenigFileUpload (cognitive 19) · ×1
  • use-koenig-file-upload.useKoenigFileUpload (cognitive 19) apps/admin-x-framework/src/hooks/use-koenig-file-upload.ts:94 — use-koenig-file-upload.useKoenigFileUpload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 2, loops 2 (nesting depth added 2). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 161, 124, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · growth-kpis.GrowthKPIs (cognitive 19) · ×1
  • growth-kpis.GrowthKPIs (cognitive 19) apps/admin/src/analytics/views/stats/growth/components/growth-kpis.tsx:158 — growth-kpis.GrowthKPIs has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, ternaries 6, if/else 4, match/switch 2. Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · growth-sources.GrowthSources (cognitive 19) · ×1
  • growth-sources.GrowthSources (cognitive 19) apps/admin/src/posts/analytics/growth/components/growth-sources.tsx:147 — growth-sources.GrowthSources has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gift-link-modal.GiftLinkModal (cognitive 19) · ×1
  • gift-link-modal.GiftLinkModal (cognitive 19) apps/admin/src/posts/analytics/modals/gift-link-modal.tsx:44 — gift-link-modal.GiftLinkModal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 2, error handling 1. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 74, 127, 143, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-post-snippets.usePostSnippets (cognitive 19) · ×1
  • use-post-snippets.usePostSnippets (cognitive 19) apps/admin/src/editor/use-post-snippets.tsx:36 — use-post-snippets.usePostSnippets has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 6, boolean chains 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 103, 43, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · comments.CommentsPage (cognitive 19) · ×1
  • comments.CommentsPage (cognitive 19) apps/admin/src/comments/comments.tsx:25 — comments.CommentsPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 5, if/else 3 (nesting depth added 6). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · field-picker.FieldPicker (cognitive 19) · ×1
  • field-picker.FieldPicker (cognitive 19) apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/field-picker.tsx:88 — field-picker.FieldPicker has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (5 pts), if/else 2 (nesting depth added 1). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · use-member-filter-fields.useMemberFilterFields (cognitive 19) · ×1
  • use-member-filter-fields.useMemberFilterFields (cognitive 19) apps/admin/src/members/use-member-filter-fields.ts:280 — use-member-filter-fields.useMemberFilterFields has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4, loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 316, 380, 508, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · stats-filter.StatsFilter (cognitive 19) · ×1
  • stats-filter.StatsFilter (cognitive 19) apps/admin/src/shared/analytics/stats-filter.tsx:338 — stats-filter.StatsFilter has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 5, if/else 2 (nesting depth added 4). Of this number, 15 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · admin-api.setupAdminAPI (cognitive 19) · ×1
  • admin-api.setupAdminAPI (cognitive 19) apps/comments-ui/src/utils/admin-api.ts:1 — admin-api.setupAdminAPI has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EmbeddedRelationAdapter.query (cognitive 19) · ×1
  • EmbeddedRelationAdapter.query (cognitive 19) apps/ember-admin/app/adapters/embedded-relation-adapter.js:42 — EmbeddedRelationAdapter.query has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Debug._fetchAnalyticsStatus (cognitive 19) · ×1
  • Debug._fetchAnalyticsStatus (cognitive 19) apps/ember-admin/app/components/posts/debug.js:266 — Debug._fetchAnalyticsStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexicalEditorController.syncMobiledocSnippets (cognitive 19) · ×1
  • LexicalEditorController.syncMobiledocSnippets (cognitive 19) REDACTED:996 — LexicalEditorController.syncMobiledocSnippets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · products-section.FreeProductCard (cognitive 19) · ×1
  • products-section.FreeProductCard (cognitive 19) apps/portal/src/components/common/products-section.jsx:688 — products-section.FreeProductCard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 6 (7 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · account-welcome.AccountWelcome (cognitive 19) · ×1
  • account-welcome.AccountWelcome (cognitive 19) apps/portal/src/components/pages/AccountHomePage/components/account-welcome.jsx:16 — account-welcome.AccountWelcome has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · filters.FilterDatePicker (cognitive 19) · ×1
  • filters.FilterDatePicker (cognitive 19) apps/shade/src/components/patterns/filters.tsx:766 — filters.FilterDatePicker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 824, 850, 795, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MetafieldDefinitionsService.edit (cognitive 19) · ×1
  • MetafieldDefinitionsService.edit (cognitive 19) ghost/core/core/server/services/members-metafields/definitions-service.ts:550 — MetafieldDefinitionsService.edit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sentry.beforeSend (cognitive 19) · ×1
  • sentry.beforeSend (cognitive 19) ghost/core/core/shared/sentry.js:11 — sentry.beforeSend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LazyUrlService.getRequiredFields (cognitive 19) · ×1
  • LazyUrlService.getRequiredFields (cognitive 19) ghost/core/core/server/services/url/lazy-url-service.ts:290 — LazyUrlService.getRequiredFields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BatchSendingService.sendBatches (cognitive 19) · ×1
  • BatchSendingService.sendBatches (cognitive 19) ghost/core/core/server/services/email-service/batch-sending-service.js:685 — BatchSendingService.sendBatches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 711). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GiftService.startCheckout (cognitive 19) · ×1
  • GiftService.startCheckout (cognitive 19) ghost/core/core/server/services/gifts/gift-service.ts:331 — GiftService.startCheckout has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, error handling 3 (4 pts), ternaries 4, boolean chains 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · StripeCoupon.create (cognitive 19) · ×1
  • StripeCoupon.create (cognitive 19) ghost/core/core/server/services/offers/domain/models/stripe-coupon.js:48 — StripeCoupon.create has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · StaffService.handleEvent (cognitive 19) · ×1
  • StaffService.handleEvent (cognitive 19) ghost/core/core/server/services/staff/staff-service.js:108 — StaffService.handleEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · middleware.SessionMiddleware (cognitive 19) · ×1
  • middleware.SessionMiddleware (cognitive 19) ghost/core/core/server/services/auth/session/middleware.js:3 — middleware.SessionMiddleware has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 5, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · og-image.getOgImage (cognitive 19) · ×1
  • og-image.getOgImage (cognitive 19) ghost/core/core/frontend/meta/og-image.js:6 — og-image.getOgImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · renderer.renderer (cognitive 19) · ×1
  • renderer.renderer (cognitive 19) ghost/core/core/frontend/services/rendering/renderer.js:17 — renderer.renderer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 45). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · twitter-image.getTwitterImage (cognitive 19) · ×1
  • twitter-image.getTwitterImage (cognitive 19) ghost/core/core/frontend/meta/twitter-image.js:6 — twitter-image.getTwitterImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · has.has (cognitive 19) · ×1
  • has.has (cognitive 19) ghost/core/core/frontend/helpers/has.js:129 — has.has has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 17, if/else 2. Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 145, 148, 151, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DataGenerator.importData (cognitive 19) · ×1
  • DataGenerator.importData (cognitive 19) ghost/core/core/server/data/seeders/data-generator.js:189 — DataGenerator.importData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-internal-packages.validateConfigFiles (cognitive 19) · ×1
  • check-internal-packages.validateConfigFiles (cognitive 19) scripts/check-internal-packages.js:98 — check-internal-packages.validateConfigFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildBookmarkData (cognitive 19) · ×1
  • buildBookmarkData (cognitive 19) ghost/core/core/server/services/oembed/oembed-service.js:609 — buildBookmarkData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · populateProductsAndPrices (cognitive 19) · ×1
  • populateProductsAndPrices (cognitive 19) ghost/core/core/server/services/stripe/stripe-migrations.js:43 — populateProductsAndPrices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleSetupEvent (cognitive 19) · ×1
  • handleSetupEvent (cognitive 19) ghost/core/core/server/services/stripe/services/webhook/checkout-session-event-service.js:260 — handleSetupEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edit (cognitive 19) · ×1
  • edit (cognitive 19) ghost/core/core/server/models/settings.js:280 — edit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function items inside it that branch ((anonymous)::then, (anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · extendModel · ×1
  • extendModel::permissible (cognitive 19) ghost/core/core/server/models/relations/authors.js:340 — extendModel::permissible has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · single (cognitive 19) · ×1
  • single (cognitive 19) ghost/core/core/server/web/api/middleware/upload.js:114 — single has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3 (nesting depth added 8). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (singleUploadFunction::(anonymous), singleUploadFunction::(anonymous)::deleteFiles, singleUploadFunction). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · .pnpmfile.beforePacking (cognitive 18) · ×1
  • .pnpmfile.beforePacking (cognitive 18) .pnpmfile.mjs:29 — .pnpmfile.beforePacking has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-form.useForm (cognitive 18) · ×1
  • use-form.useForm (cognitive 18) apps/admin-x-framework/src/hooks/use-form.ts:51 — use-form.useForm has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 97, 74, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · url-helpers.generateTitleFromPath (cognitive 18) · ×1
  • url-helpers.generateTitleFromPath (cognitive 18) apps/admin/src/analytics/utils/url-helpers.ts:33 — url-helpers.generateTitleFromPath has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post-context-menu-items.getPostContextMenuItems (cognitive 18) · ×1
  • post-context-menu-items.getPostContextMenuItems (cognitive 18) apps/admin/src/posts/list/post-context-menu-items.ts:77 — post-context-menu-items.getPostContextMenuItems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (18 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post-settings-sidebar.PostSettingsSidebar (cognitive 18) · ×1
  • post-settings-sidebar.PostSettingsSidebar (cognitive 18) apps/admin/src/editor/settings/post-settings-sidebar.tsx:111 — post-settings-sidebar.PostSettingsSidebar has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, boolean chains 7, if/else 1. Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · members-header-search.MembersHeaderSearch (cognitive 18) · ×1
  • members-header-search.MembersHeaderSearch (cognitive 18) apps/admin/src/members/components/members-header-search.tsx:16 — members-header-search.MembersHeaderSearch has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 6 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · custom-integration-modal.CustomIntegrationModalContent (cognitive 18) · ×1
  • custom-integration-modal.CustomIntegrationModalContent (cognitive 18) apps/admin/src/settings/advanced/integrations/custom-integration-modal.tsx:30 — custom-integration-modal.CustomIntegrationModalContent has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (4 pts), ternaries 4, error handling 2 (nesting depth added 1). Of this number, 9 points are the body's own statements and 9 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-pintura-editor.usePinturaEditor (cognitive 18) · ×1
  • use-pintura-editor.usePinturaEditor (cognitive 18) apps/admin/src/hooks/use-pintura-editor.ts:11 — use-pintura-editor.usePinturaEditor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, error handling 1. Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 64, 19, 42, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · content.Content (cognitive 18) · ×1
  • content.Content (cognitive 18) apps/comments-ui/src/components/content/content.tsx:33 — content.Content has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (8 pts), if/else 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GhSegmentTokenInput.searchTask (cognitive 18) · ×1
  • GhSegmentTokenInput.searchTask (cognitive 18) apps/ember-admin/app/components/gh-segment-token-input.js:53 — GhSegmentTokenInput.searchTask has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 7). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errors.chooseBestErrorMessage (cognitive 18) · ×1
  • errors.chooseBestErrorMessage (cognitive 18) apps/portal/src/utils/errors.js:83 — errors.chooseBestErrorMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · recommendations-page.RecommendationsPage (cognitive 18) · ×1
  • recommendations-page.RecommendationsPage (cognitive 18) apps/portal/src/components/pages/recommendations-page.jsx:324 — recommendations-page.RecommendationsPage has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · utils.loadAdapterClass (cognitive 18) · ×1
  • utils.loadAdapterClass (cognitive 18) ghost/core/core/server/services/adapter-manager/utils.ts:136 — utils.loadAdapterClass has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (4 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostsService.#bulkAddTags (cognitive 18) · ×1
  • PostsService.#bulkAddTags (cognitive 18) ghost/core/core/server/services/posts/posts-service.js:251 — PostsService.#bulkAddTags has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), boolean chains 2, ternaries 2 (nesting depth added 5). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemberWelcomeEmailRenderer.render (cognitive 18) · ×1
  • MemberWelcomeEmailRenderer.render (cognitive 18) ghost/core/core/server/services/member-welcome-emails/member-welcome-email-renderer.js:128 — MemberWelcomeEmailRenderer.render has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 2, error handling 1. Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PostsStatsService._generateTitleFromPath (cognitive 18) · ×1
  • PostsStatsService._generateTitleFromPath (cognitive 18) ghost/core/core/server/services/stats/posts-stats-service.js:268 — PostsStatsService._generateTitleFromPath has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · url.getUrl (cognitive 18) · ×1
  • url.getUrl (cognitive 18) ghost/core/core/frontend/meta/url.js:23 — url.getUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compare-image-report.render (cognitive 18) · ×1
  • compare-image-report.render (cognitive 18) scripts/compare-image-report.js:116 — compare-image-report.render has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), ternaries 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getMemberOffers (cognitive 18) · ×1
  • getMemberOffers (cognitive 18) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:1212 — getMemberOffers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, error handling 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · getCustomerIdByEmail (cognitive 18) · ×1
  • getCustomerIdByEmail (cognitive 18) ghost/core/core/server/services/stripe/stripe-api.js:345 — getCustomerIdByEmail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createTable (cognitive 18) · ×1
  • createTable (cognitive 18) ghost/core/core/server/data/schema/commands.js:632 — createTable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 639, 656, 633, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · moderateComment (cognitive 18) · ×1
  • moderateComment (cognitive 18) ghost/core/core/server/services/comments/comments-service.js:627 — moderateComment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #fetchEventsFromDomain (cognitive 18) · ×1
  • #fetchEventsFromDomain (cognitive 18) ghost/core/core/server/services/lib/mailgun-client.js:261 — #fetchEventsFromDomain has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (4 pts), ternaries 4, error handling 1, loops 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · content-text.renderedTextOf (cognitive 17) · ×1
  • content-text.renderedTextOf (cognitive 17) apps/admin/src/editor/session/content-text.ts:127 — content-text.renderedTextOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · members-list.MembersList (cognitive 17) · ×1
  • members-list.MembersList (cognitive 17) apps/admin/src/members/components/members-list.tsx:56 — members-list.MembersList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 2. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 115, 131, 201, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · activity-row.ActivityRow (cognitive 17) · ×1
  • activity-row.ActivityRow (cognitive 17) apps/admin/src/members/activity/activity-row.tsx:26 — activity-row.ActivityRow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (7 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · navigation-item-editor.NavigationItemEditor (cognitive 17) · ×1
  • navigation-item-editor.NavigationItemEditor (cognitive 17) apps/admin/src/settings/site/navigation/navigation-item-editor.tsx:37 — navigation-item-editor.NavigationItemEditor has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. Of this number, 10 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · profile-tab.BasicInputs (cognitive 17) · ×1
  • profile-tab.BasicInputs (cognitive 17) apps/admin/src/settings/general/users/profile-tab.tsx:19 — profile-tab.BasicInputs has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · portal-links.PortalLinks (cognitive 17) · ×1
  • portal-links.PortalLinks (cognitive 17) apps/admin/src/settings/membership/portal/portal-links.tsx:46 — portal-links.PortalLinks has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13, boolean chains 3, if/else 1. Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · stripe-connect-modal.StripeConnectModal (cognitive 17) · ×1
  • stripe-connect-modal.StripeConnectModal (cognitive 17) apps/admin/src/settings/membership/stripe/stripe-connect-modal.tsx:375 — stripe-connect-modal.StripeConnectModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · add-newsletter-modal.AddNewsletterModal (cognitive 17) · ×1
  • add-newsletter-modal.AddNewsletterModal (cognitive 17) apps/admin/src/settings/email/newsletters/add-newsletter-modal.tsx:28 — add-newsletter-modal.AddNewsletterModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 4 (6 pts), boolean chains 5 (nesting depth added 2). Of this number, 11 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · offers-container-modal.OffersRouteHandler (cognitive 17) · ×1
  • offers-container-modal.OffersRouteHandler (cognitive 17) apps/admin/src/settings/growth/offers/offers-container-modal.tsx:21 — offers-container-modal.OffersRouteHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tag-image-field.TagImageField (cognitive 17) · ×1
  • tag-image-field.TagImageField (cognitive 17) apps/admin/src/tags/detail/tag-image-field.tsx:45 — tag-image-field.TagImageField has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 92, 86, 153, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-theme.useTheme (cognitive 17) · ×1
  • use-theme.useTheme (cognitive 17) apps/admin/src/hooks/use-theme.ts:52 — use-theme.useTheme has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 4, ternaries 4, error handling 1. Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 65, 108, 82, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · edit-row.EditRow (cognitive 17) · ×1
  • edit-row.EditRow (cognitive 17) apps/admin/src/members/label-picker/edit-row.tsx:15 — edit-row.EditRow has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 4 (5 pts), boolean chains 2, error handling 2 (nesting depth added 3). Of this number, 10 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · search.useSearchService (cognitive 17) · ×1
  • search.useSearchService (cognitive 17) apps/admin/src/settings/utils/search.tsx:22 — search.useSearchService has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 80, 37, 59, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · comment.PublishedComment (cognitive 17) · ×1
  • comment.PublishedComment (cognitive 17) apps/comments-ui/src/components/content/comment.tsx:145 — comment.PublishedComment has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), ternaries 4 (nesting depth added 1). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · main-form.MainForm (cognitive 17) · ×1
  • main-form.MainForm (cognitive 17) apps/comments-ui/src/components/content/forms/main-form.tsx:11 — main-form.MainForm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 49, 15, 42, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GhSiteIframeComponent.resetSrcAttribute (cognitive 17) · ×1
  • GhSiteIframeComponent.resetSrcAttribute (cognitive 17) apps/ember-admin/app/components/gh-site-iframe.js:34 — GhSiteIframeComponent.resetSrcAttribute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gh-format-post-time.formatPostTime (cognitive 17) · ×1
  • gh-format-post-time.formatPostTime (cognitive 17) apps/ember-admin/app/helpers/gh-format-post-time.js:6 — gh-format-post-time.formatPostTime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · actions.signup (cognitive 17) · ×1
  • actions.signup (cognitive 17) apps/portal/src/actions.js:227 — actions.signup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · commands.addForeign (cognitive 17) · ×1
  • commands.addForeign (cognitive 17) ghost/core/core/server/data/schema/commands.js:425 — commands.addForeign has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, error handling 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · actions.default (cognitive 17) · ×1
  • actions.default (cognitive 17) ghost/core/core/server/models/base/plugins/actions.js:12 — actions.default has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts) (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CacheManager._doGet (cognitive 17) · ×1
  • CacheManager._doGet (cognitive 17) ghost/core/core/shared/settings-cache/cache-manager.js:121 — CacheManager._doGet has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · members.serializeMember (cognitive 17) · ×1
  • members.serializeMember (cognitive 17) ghost/core/core/server/api/endpoints/utils/serializers/output/members.js:95 — members.serializeMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsBREADService.prepSettingsForEmailVerification (cognitive 17) · ×1
  • SettingsBREADService.prepSettingsForEmailVerification (cognitive 17) ghost/core/core/server/services/settings/settings-bread-service.js:416 — SettingsBREADService.prepSettingsForEmailVerification has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Base.handleError (cognitive 17) · ×1
  • Base.handleError (cognitive 17) ghost/core/core/server/data/importer/importers/data/base.js:111 — Base.handleError has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 120). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GiftEmailAnalyticsBatchProcessor.processBatch (cognitive 17) · ×1
  • GiftEmailAnalyticsBatchProcessor.processBatch (cognitive 17) ghost/core/core/server/services/email-analytics/gift-email-analytics-batch-processor.ts:29 — GiftEmailAnalyticsBatchProcessor.processBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostsStatsService._buildFreeMembersSubquery (cognitive 17) · ×1
  • PostsStatsService._buildFreeMembersSubquery (cognitive 17) ghost/core/core/server/services/stats/posts-stats-service.js:472 — PostsStatsService._buildFreeMembersSubquery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 4 (nesting depth added 2). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · serve-public-file.createPublicFileMiddleware (cognitive 17) · ×1
  • serve-public-file.createPublicFileMiddleware (cognitive 17) ghost/core/core/frontend/web/routers/serve-public-file.js:32 — serve-public-file.createPublicFileMiddleware has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 73, 46, 54). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · middleware.tokenPermissionCheck (cognitive 17) · ×1
  • middleware.tokenPermissionCheck (cognitive 17) ghost/core/core/server/web/api/endpoints/admin/middleware.js:17 — middleware.tokenPermissionCheck has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · check-agent-skill-links.checkAgentSkillLinks (cognitive 17) · ×1
  • check-agent-skill-links.checkAgentSkillLinks (cognitive 17) scripts/check-agent-skill-links.js:5 — check-agent-skill-links.checkAgentSkillLinks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateSubscription (cognitive 17) · ×1
  • updateSubscription (cognitive 17) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:2118 — updateSubscription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _getImageSizeFromUrl (cognitive 17) · ×1
  • _getImageSizeFromUrl (cognitive 17) ghost/core/core/server/lib/image/image-size.js:179 — _getImageSizeFromUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 207, 198). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · _syncRepositoryWithTheme (cognitive 17) · ×1
  • _syncRepositoryWithTheme (cognitive 17) ghost/core/core/shared/custom-theme-settings-cache/custom-theme-settings-service.js:230 — _syncRepositoryWithTheme has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 1 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #runMemberQueries (cognitive 17) · ×1
  • #runMemberQueries (cognitive 17) ghost/core/core/server/services/milestones/milestones-service.js:295 — #runMemberQueries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-activity-pub-queries.useUnfollowMutationForUser (cognitive 16) · ×1
  • use-activity-pub-queries.useUnfollowMutationForUser (cognitive 16) apps/activitypub/src/hooks/use-activity-pub-queries.ts:987 — use-activity-pub-queries.useUnfollowMutationForUser has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 1007, 1026, 1092, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · components.Toolbar (cognitive 16) · ×1
  • components.Toolbar (cognitive 16) apps/admin-toolbar/src/components.js:146 — components.Toolbar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 3. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 170, 190, 210, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · actions.getActionTitle (cognitive 16) · ×1
  • actions.getActionTitle (cognitive 16) apps/admin-x-framework/src/api/actions.ts:192 — actions.getActionTitle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · newsletters.NewsletterTableRows (cognitive 16) · ×1
  • newsletters.NewsletterTableRows (cognitive 16) apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx:67 — newsletters.NewsletterTableRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 5, if/else 1 (nesting depth added 4). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · admin-layout.AdminLayout (cognitive 16) · ×1
  • admin-layout.AdminLayout (cognitive 16) apps/admin/src/layout/admin-layout.tsx:54 — admin-layout.AdminLayout has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (4 pts), ternaries 4, loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · manage-post-view-popover.PopoverBody (cognitive 16) · ×1
  • manage-post-view-popover.PopoverBody (cognitive 16) apps/admin/src/posts/list/components/manage-post-view-popover.tsx:58 — manage-post-view-popover.PopoverBody has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4, boolean chains 3, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 76, 100, 133). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · confirm-step.ConfirmStep (cognitive 16) · ×1
  • confirm-step.ConfirmStep (cognitive 16) apps/admin/src/editor/publish/components/confirm-step.tsx:45 — confirm-step.ConfirmStep has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · members-filters.MembersFilters (cognitive 16) · ×1
  • members-filters.MembersFilters (cognitive 16) apps/admin/src/members/components/members-filters.tsx:87 — members-filters.MembersFilters has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (7 pts) (nesting depth added 2). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · member-add-comp-modal.MemberAddCompModal (cognitive 16) · ×1
  • member-add-comp-modal.MemberAddCompModal (cognitive 16) apps/admin/src/members/detail/member-add-comp-modal.tsx:47 — member-add-comp-modal.MemberAddCompModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, ternaries 5, if/else 4, error handling 1, loops 1. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 84, 59, 75, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · theme-file-tree.ThemeFileTree (cognitive 16) · ×1
  • theme-file-tree.ThemeFileTree (cognitive 16) apps/admin/src/settings/site/theme/theme-file-tree.tsx:100 — theme-file-tree.ThemeFileTree has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (7 pts), if/else 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 113, 151, 178). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · user-detail-modal.UserDetailModal (cognitive 16) · ×1
  • user-detail-modal.UserDetailModal (cognitive 16) apps/admin/src/settings/general/user-detail-modal.tsx:671 — user-detail-modal.UserDetailModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 3. Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · offers-index.OffersIndexModal (cognitive 16) · ×1
  • offers-index.OffersIndexModal (cognitive 16) apps/admin/src/settings/growth/offers/offers-index.tsx:335 — offers-index.OffersIndexModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1. Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 363, 425, 472, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · label-filter-renderer.LabelFilterRenderer (cognitive 16) · ×1
  • label-filter-renderer.LabelFilterRenderer (cognitive 16) apps/admin/src/members/label-picker/label-filter-renderer.tsx:19 — label-filter-renderer.LabelFilterRenderer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 4, boolean chains 3, error handling 1. Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 53, 33, 114, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · emails.EmailsGroup (cognitive 16) · ×1
  • emails.EmailsGroup (cognitive 16) apps/admin/src/settings/email/emails.tsx:87 — emails.EmailsGroup has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 119, 108, 102). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-navigation-editor.useNavigationEditor (cognitive 16) · ×1
  • use-navigation-editor.useNavigationEditor (cognitive 16) apps/admin/src/settings/hooks/site/use-navigation-editor.tsx:57 — use-navigation-editor.useNavigationEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 80, 164, 123, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · helpers.getScrollToPosition (cognitive 16) · ×1
  • helpers.getScrollToPosition (cognitive 16) apps/comments-ui/src/utils/helpers.ts:169 — helpers.getScrollToPosition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PublishModalComponent.setCompleted (cognitive 16) · ×1
  • PublishModalComponent.setCompleted (cognitive 16) apps/ember-admin/app/components/editor/modals/publish-flow.js:54 — PublishModalComponent.setCompleted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GhKoenigEditorLexical.onExcerptKeydown (cognitive 16) · ×1
  • GhKoenigEditorLexical.onExcerptKeydown (cognitive 16) apps/ember-admin/app/components/gh-koenig-editor-lexical.js:190 — GhKoenigEditorLexical.onExcerptKeydown has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotificationsService._showAPIError (cognitive 16) · ×1
  • NotificationsService._showAPIError (cognitive 16) apps/ember-admin/app/services/notifications.js:168 — NotificationsService._showAPIError has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · account-plan-page.getRetentionOfferMessage (cognitive 16) · ×1
  • account-plan-page.getRetentionOfferMessage (cognitive 16) apps/portal/src/components/pages/account-plan-page.jsx:311 — account-plan-page.getRetentionOfferMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recommendations-page.RecommendationItem (cognitive 16) · ×1
  • recommendations-page.RecommendationItem (cognitive 16) apps/portal/src/components/pages/recommendations-page.jsx:195 — recommendations-page.RecommendationItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 211, 243, 268, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · account-email-page.AccountEmailPage (cognitive 16) · ×1
  • account-email-page.AccountEmailPage (cognitive 16) apps/portal/src/components/pages/account-email-page.jsx:8 — account-email-page.AccountEmailPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 43, 30, 120, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plan-step.GiftPlanStep (cognitive 16) · ×1
  • plan-step.GiftPlanStep (cognitive 16) apps/portal/src/components/pages/gift/plan-step.tsx:74 — plan-step.GiftPlanStep has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 6. Of this number, 8 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MetafieldValuesService.planWrite (cognitive 16) · ×1
  • MetafieldValuesService.planWrite (cognitive 16) ghost/core/core/server/services/members-metafields/values-service.ts:257 — MetafieldValuesService.planWrite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · duplicate-deps.checkDuplicateDependencies (cognitive 16) · ×1
  • duplicate-deps.checkDuplicateDependencies (cognitive 16) ghost/core/bin/lib/duplicate-deps.ts:179 — duplicate-deps.checkDuplicateDependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlogIcon.getIconUrl (cognitive 16) · ×1
  • BlogIcon.getIconUrl (cognitive 16) ghost/core/core/server/lib/image/blog-icon.js:113 — BlogIcon.getIconUrl has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReferrerTranslator.getReferrerDetails (cognitive 16) · ×1
  • ReferrerTranslator.getReferrerDetails (cognitive 16) ghost/core/core/server/services/member-attribution/referrer-translator.js:38 — ReferrerTranslator.getReferrerDetails has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StaffServiceEmails.notifyPaidSubscriptionStarted (cognitive 16) · ×1
  • StaffServiceEmails.notifyPaidSubscriptionStarted (cognitive 16) ghost/core/core/server/services/staff/staff-service-emails.js:79 — StaffServiceEmails.notifyPaidSubscriptionStarted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostsImporter.replaceIdentifiers (cognitive 16) · ×1
  • PostsImporter.replaceIdentifiers (cognitive 16) ghost/core/core/server/data/importer/importers/data/posts-importer.js:134 — PostsImporter.replaceIdentifiers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 147, 141, 219, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · row.importableRowSchema (cognitive 16) · ×1
  • row.importableRowSchema (cognitive 16) ghost/core/core/server/services/content-import/import/row.ts:101 — row.importableRowSchema has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmailAnalyticsServiceWrapper._logJobCompletion (cognitive 16) · ×1
  • EmailAnalyticsServiceWrapper._logJobCompletion (cognitive 16) ghost/core/core/server/services/email-analytics/email-analytics-service-wrapper.ts:80 — EmailAnalyticsServiceWrapper._logJobCompletion has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · NewsletterEmailAnalyticsBatchProcessor.processBatch (cognitive 16) · ×1
  • NewsletterEmailAnalyticsBatchProcessor.processBatch (cognitive 16) ghost/core/core/server/services/email-analytics/newsletter-email-analytics-batch-processor.js:34 — NewsletterEmailAnalyticsBatchProcessor.processBatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContentStatsService.enrichTopContentData (cognitive 16) · ×1
  • ContentStatsService.enrichTopContentData (cognitive 16) ghost/core/core/server/services/stats/content-stats-service.js:238 — ContentStatsService.enrichTopContentData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 249, 303). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · entry.entryController (cognitive 16) · ×1
  • entry.entryController (cognitive 16) ghost/core/core/frontend/services/routing/controllers/entry.ts:55 — entry.entryController has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 2, error handling 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · asset-url.getAssetUrl (cognitive 16) · ×1
  • asset-url.getAssetUrl (cognitive 16) ghost/core/core/frontend/meta/asset-url.js:104 — asset-url.getAssetUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · post_class.post_class (cognitive 16) · ×1
  • post_class.post_class (cognitive 16) ghost/core/core/frontend/helpers/post_class.js:9 — post_class.post_class has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MachinePaymentsService.#handleFulfill (cognitive 16) · ×1
  • MachinePaymentsService.#handleFulfill (cognitive 16) ghost/core/core/server/services/machine-payments/service.ts:203 — MachinePaymentsService.#handleFulfill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateCheckService.createCustomNotification (cognitive 16) · ×1
  • UpdateCheckService.createCustomNotification (cognitive 16) ghost/core/core/server/services/update-check/update-check-service.js:291 — UpdateCheckService.createCustomNotification has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 3, error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · boot.bootGhost (cognitive 16) · ×1
  • boot.bootGhost (cognitive 16) ghost/core/core/boot.js:570 — boot.bootGhost has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · release.detectBumpType (cognitive 16) · ×1
  • release.detectBumpType (cognitive 16) scripts/release.js:121 — release.detectBumpType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2, boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sendMagicLink (cognitive 16) · ×1
  • sendMagicLink (cognitive 16) ghost/core/core/server/services/members/members-api/controllers/router-controller.js:913 — sendMagicLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · setupGhostApi · ×1
  • setupGhostApi::checkoutGift (cognitive 16) apps/portal/src/utils/api.js:755 — setupGhostApi::checkoutGift has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, if/else 4 (5 pts), error handling 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · reportBillingAppLoadFailure (cognitive 16) · ×1
  • reportBillingAppLoadFailure (cognitive 16) apps/ember-admin/app/services/billing.js:470 — reportBillingAppLoadFailure has cognitive complexity 16 (threshold 15). Drivers by points: other 5, if/else 4, error handling 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · handleDonationEvent (cognitive 16) · ×1
  • handleDonationEvent (cognitive 16) ghost/core/core/server/services/stripe/services/webhook/checkout-session-event-service.js:214 — handleDonationEvent has cognitive complexity 16 (threshold 15). Drivers by points: other 14, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · send (cognitive 16) · ×1
  • send (cognitive 16) ghost/core/core/server/services/lib/mailgun-client.js:40 — send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, ternaries 2, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MembersAPI · ×1
  • MembersAPI::getMemberDataFromMagicLinkToken (cognitive 16) ghost/core/core/server/services/members/members-api/members-api.js:272 — MembersAPI::getMemberDataFromMagicLinkToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sortTableList (cognitive 16) · ×1
  • sortTableList (cognitive 16) ghost/core/core/server/data/seeders/data-generator.js:53 — sortTableList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 58, 77). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 3034 typed · 2796 plain JS — the untyped files are apps/admin-toolbar/src/actions.js, apps/admin-toolbar/src/auth.js, apps/admin-toolbar/src/components.js, apps/admin-toolbar/src/config.js, apps/admin-toolbar/src/constants.js, apps/admin-toolbar/src/icons.js (+2790 more).
R10 · Code Duplication · Duplication concentrated across 14 sibling directories (90 clone groups) · ×1
  • Duplication concentrated across 14 sibling directories (90 clone groups) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:33 — 90 duplicated blocks under apps/admin/src/ have copies in at least two of the sibling directories analytics, automations, comments, editor, global-search, hooks (+8 more sibling(s) not listed) — 56 of them are reported below, and 34 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 90 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 90 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 90 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 11 sibling directories (80 clone groups) · ×1
  • Duplication concentrated across 11 sibling directories (80 clone groups) apps/admin/src/members/detail/member-event.ts:136 — 80 duplicated blocks under apps/ have copies in at least two of the sibling directories activitypub, admin, admin-toolbar, admin-x-framework, announcement-bar, comments-ui (+5 more sibling(s) not listed) — 55 of them are reported below, and 25 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 80 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 80 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 80 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 39 sibling directories (59 clone groups) · ×1
  • Duplication concentrated across 39 sibling directories (59 clone groups) ghost/core/core/server/services/newsletters/newsletters-service.js:18 — 59 duplicated blocks under ghost/core/core/server/services/ have copies in at least two of the sibling directories audience-feedback, auth, comments, content-import, donations, email-analytics (+33 more sibling(s) not listed) — 28 of them are reported below, and 31 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 59 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 59 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 59 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 9 sibling directories (50 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (50 clone groups) apps/admin/src/settings/advanced/history-modal.tsx:109 — 50 duplicated blocks under apps/admin/src/settings/ have copies in at least two of the sibling directories advanced, components, email, email-design, general, growth (+3 more sibling(s) not listed) — 25 of them are reported below, and 25 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 50 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 50 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 50 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 40 sibling directories (31 clone groups) · ×1
  • Duplication concentrated across 40 sibling directories (31 clone groups) ghost/core/core/server/data/migrations/versions/5.3/2022-07-06-09-26-add-ghost-explore-integration-api-key.js:10 — 31 duplicated blocks under ghost/core/core/server/data/migrations/versions/ have copies in at least two of the sibling directories 5.0, 5.10, 5.100, 5.102, 5.11, 5.113 (+34 more sibling(s) not listed) — 19 of them are reported below, and 12 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 31 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (15 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (15 clone groups) apps/comments-ui/tailwind.config.js:1 — 15 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, ghost, koenig — 9 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (15 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (15 clone groups) ghost/core/core/server/models/user.js:1021 — 15 duplicated blocks under ghost/core/core/server/ have copies in at least two of the sibling directories adapters, api, data, lib, models, services (+1 more sibling(s) not listed) — 4 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (12 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (12 clone groups) apps/activitypub/src/views/feed/components/feed-list.tsx:34 — 12 duplicated blocks under apps/activitypub/src/views/ have copies in at least two of the sibling directories feed, inbox, notifications, preferences, profile — 11 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (9 clone groups) apps/shade/src/components/patterns/filters.tsx:1855 — 9 duplicated blocks under apps/shade/src/components/ have copies in at least two of the sibling directories layout, patterns, ui — 3 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (8 clone groups) apps/activitypub/src/components/global/suggested-profiles.tsx:22 — 8 duplicated blocks under apps/activitypub/src/ have copies in at least two of the sibling directories components, views — 5 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (7 clone groups) apps/ember-admin/app/components/editor/modals/re-verify.js:9 — 7 duplicated blocks under apps/ember-admin/app/ have copies in at least two of the sibling directories components, controllers, helpers, instance-initializers, services — 3 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (7 clone groups) ghost/core/core/frontend/services/data/match-permalink-params.js:6 — 7 duplicated blocks under ghost/core/core/ have copies in at least two of the sibling directories frontend, server, shared — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (6 clone groups) apps/admin/src/posts/analytics/hooks/use-post-newsletter-stats.ts:61 — 6 duplicated blocks under apps/admin/src/posts/analytics/ have copies in at least two of the sibling directories growth, hooks, newsletter, overview, web — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (5 clone groups) apps/admin/src/analytics/views/stats/growth/growth.tsx:230 — 5 duplicated blocks under apps/admin/src/analytics/views/stats/ have copies in at least two of the sibling directories growth, locations, newsletters, overview, web — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (278 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (278 matched lines × 2 locations) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:33 — apps/admin/src/automations/components/email-modal/email-content-modal.tsx:33 · apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:35 — the two spans are one implementation copied and then locally edited — 1388 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (241 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (241 matched lines × 2 locations) apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:126 — apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:126 · apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:201 — the two spans are one implementation copied and then locally edited — 1167 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (167 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (167 matched lines × 2 locations) apps/admin/src/members/detail/member-detail.tsx:75 — apps/admin/src/members/detail/member-detail.tsx:75 · apps/admin/src/tags/detail/tag-detail.tsx:58 — the two spans are one implementation copied and then locally edited — 847 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (144 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (144 matched lines × 2 locations) apps/shade/src/components/ui/context-menu.tsx:8 — apps/shade/src/components/ui/context-menu.tsx:8 · apps/shade/src/components/ui/dropdown-menu.tsx:8 — the two spans are one implementation copied and then locally edited — 875 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (141 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (141 matched lines × 2 locations) ghost/core/core/server/api/endpoints/utils/serializers/input/pages.js:14 — ghost/core/core/server/api/endpoints/utils/serializers/input/pages.js:14 · ghost/core/core/server/api/endpoints/utils/serializers/input/posts.js:14 — the two spans are one implementation copied and then locally edited — 1005 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (137 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (137 matched lines × 2 locations) ghost/core/core/server/adapters/redirects/S3RedirectsStore.ts:30 — ghost/core/core/server/adapters/redirects/S3RedirectsStore.ts:30 · ghost/core/core/server/adapters/route-settings/S3RouteSettingsStore.ts:38 — the two spans are one implementation copied and then locally edited — 919 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (131 identical lines × 2 files) · ×1
  • Wholesale file copy (131 identical lines × 2 files) apps/comments-ui/tailwind.config.js:1 — apps/comments-ui/tailwind.config.js:1 · koenig/kg-unsplash-selector/tailwind.config.cjs:1 — these 2 files are line-for-line copies of one another — 131 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (120 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (120 matched lines × 2 locations) apps/admin/src/settings/email/newsletters.tsx:21 — apps/admin/src/settings/email/newsletters.tsx:21 · apps/admin/src/settings/email/newsletters/newsletters-tab-content.tsx:20 — the two spans are one implementation copied and then locally edited — 685 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) apps/admin/src/members/detail/member-event.ts:136 — apps/admin/src/members/detail/member-event.ts:136 · apps/ember-admin/app/helpers/parse-member-event.js:87 — the two spans are one implementation copied and then locally edited — 615 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (114 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (114 matched lines × 2 locations) apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:94 — apps/admin/src/members/components/bulk-action-modals/import-members/components/mapping-step.tsx:94 · apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx:425 — the two spans are one implementation copied and then locally edited — 611 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (104 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (104 matched lines × 2 locations) apps/ember-admin/app/components/editor/modals/re-verify.js:9 — apps/ember-admin/app/components/editor/modals/re-verify.js:9 · apps/ember-admin/app/controllers/signin-verify.js:12 — the two spans are one implementation copied and then locally edited — 551 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (100 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (100 matched lines × 2 locations) apps/admin/src/automations/components/email-modal/use-email-preview.ts:20 — apps/admin/src/automations/components/email-modal/use-email-preview.ts:20 · apps/admin/src/settings/membership/member-emails/use-welcome-email-preview.ts:23 — the two spans are one implementation copied and then locally edited — 618 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (99 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (99 matched lines × 2 locations) apps/admin-x-framework/src/utils/source-utils.ts:43 — apps/admin-x-framework/src/utils/source-utils.ts:43 · ghost/core/core/server/services/stats/referrers-stats-service.js:7 — the two spans are one implementation copied and then locally edited — 580 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (98 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (98 matched lines × 2 locations) ghost/core/core/frontend/src/cards/js/audio.js:1 — ghost/core/core/frontend/src/cards/js/audio.js:1 · ghost/core/core/frontend/src/cards/js/video.js:1 — the two spans are one implementation copied and then locally edited — 683 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (97 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (97 matched lines × 2 locations) ghost/core/core/server/models/label.js:14 — ghost/core/core/server/models/label.js:14 · ghost/core/core/server/models/tag.js:73 — the two spans are one implementation copied and then locally edited — 644 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (96 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (96 matched lines × 2 locations) apps/admin-x-framework/src/api/pages.ts:46 — apps/admin-x-framework/src/api/pages.ts:46 · apps/admin-x-framework/src/api/posts.ts:63 — the two spans are one implementation copied and then locally edited — 681 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (94 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (94 matched lines × 2 locations) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245 — apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245 · apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:370 — the two spans are one implementation copied and then locally edited — 553 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (90 identical lines × 2 files) · ×1
  • Wholesale file copy (90 identical lines × 2 files) apps/admin/src/automations/components/email-modal/preview-frame.tsx:1 — apps/admin/src/automations/components/email-modal/preview-frame.tsx:1 · apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:1 — these 2 files are line-for-line copies of one another — 90 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (86 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (86 matched lines × 2 locations) apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83 — apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83 · apps/admin/src/posts/analytics/web/components/sources.tsx:76 — the two spans are one implementation copied and then locally edited — 427 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (77 lines × 2 locations) · ×1
  • Duplicated block (77 lines × 2 locations) ghost/core/core/server/services/stripe/stripe-migrations.js:305 — ghost/core/core/server/services/stripe/stripe-migrations.js:305 · ghost/core/core/server/services/stripe/stripe-migrations.js:395 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (76 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (76 matched lines × 2 locations) apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:35 — apps/admin/src/members/components/bulk-action-modals/import-members-modal.tsx:35 · apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/import-members-modal.tsx:61 — the two spans are one implementation copied and then locally edited — 474 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (76 lines × 2 locations) · ×1
  • Duplicated block (76 lines × 2 locations) apps/comments-ui/src/actions.ts:310 — apps/comments-ui/src/actions.ts:310 · apps/comments-ui/src/actions.ts:418 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (72 lines × 2 locations) · ×1
  • Duplicated block (72 lines × 2 locations) ghost/core/core/server/api/endpoints/labels.js:36 — ghost/core/core/server/api/endpoints/labels.js:36 · ghost/core/core/server/api/endpoints/tags.js:20 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (71 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (71 matched lines × 2 locations) apps/admin/src/settings/growth/offers/offers-index.tsx:108 — apps/admin/src/settings/growth/offers/offers-index.tsx:108 · apps/admin/src/settings/growth/offers/offers-index.tsx:202 — the two spans are one implementation copied and then locally edited — 299 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (70 identical lines × 2 files) · ×1
  • Wholesale file copy (70 identical lines × 2 files) apps/comments-ui/src/components/popups/delete-popup.tsx:1 — apps/comments-ui/src/components/popups/delete-popup.tsx:1 · apps/comments-ui/src/components/popups/report-popup.tsx:1 — these 2 files are line-for-line copies of one another — 70 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (68 lines × 2 locations) · ×1
  • Duplicated block (68 lines × 2 locations) apps/admin/src/settings/general/seo-meta.tsx:252 — apps/admin/src/settings/general/seo-meta.tsx:252 · apps/admin/src/settings/general/seo-meta.tsx:333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R2 · Cyclomatic Complexity · Complex function linkSubscription (cyclomatic 124, cognitive 179) · ×1
  • Complex function linkSubscription (cyclomatic 124, cognitive 179) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:1223 — linkSubscription has cyclomatic complexity 124 and cognitive complexity 179; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onSaving (cyclomatic 113, cognitive 123) · ×1
  • Complex function onSaving (cyclomatic 113, cognitive 123) ghost/core/core/server/models/post.js:572 — onSaving has cyclomatic complexity 113 and cognitive complexity 123; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 98, cognitive 99) · ×1
  • Complex function (anonymous) (cyclomatic 98, cognitive 99) REDACTED:56 — (anonymous) has cyclomatic complexity 98 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function FeedItem (cyclomatic 82, cognitive 102) · ×1
  • Complex function FeedItem (cyclomatic 82, cognitive 102) apps/activitypub/src/components/feed/feed-item.tsx:506 — FeedItem has cyclomatic complexity 82 and cognitive complexity 102; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Domain (cyclomatic 66, cognitive 57) · ×1
  • Complex function Domain (cyclomatic 66, cognitive 57) apps/activitypub/src/views/preferences/components/domain.tsx:88 — Domain has cyclomatic complexity 66 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function PostPreviewModal (cyclomatic 62, cognitive 46) · ×1
  • Complex function PostPreviewModal (cyclomatic 62, cognitive 46) apps/admin/src/editor/preview/post-preview-modal.tsx:80 — PostPreviewModal has cyclomatic complexity 62 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getDescription (cyclomatic 61, cognitive 56) · ×1
  • Complex function getDescription (cyclomatic 61, cognitive 56) ghost/core/core/frontend/meta/description.js:5 — getDescription has cyclomatic complexity 61 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function update (cyclomatic 55, cognitive 79) · ×1
  • Complex function update (cyclomatic 55, cognitive 79) ghost/core/core/server/services/members/members-api/repositories/member-repository.js:664 — update has cyclomatic complexity 55 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function MemberDetailPage (cyclomatic 52, cognitive 46) · ×1
  • Complex function MemberDetailPage (cyclomatic 52, cognitive 46) apps/admin/src/members/detail/member-detail.tsx:67 — MemberDetailPage has cyclomatic complexity 52 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 52, cognitive 43) · ×1
  • Complex function (anonymous) (cyclomatic 52, cognitive 43) apps/activitypub/src/views/notifications/notifications.tsx:414 — (anonymous) has cyclomatic complexity 52 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ghost_head (cyclomatic 51, cognitive 74) · ×1
  • Complex function ghost_head (cyclomatic 51, cognitive 74) ghost/core/core/frontend/helpers/ghost_head.js:359 — ghost_head has cyclomatic complexity 51 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fetchQueryStrData (cyclomatic 50, cognitive 57) · ×1
  • Complex function fetchQueryStrData (cyclomatic 50, cognitive 57) REDACTED:492 — fetchQueryStrData has cyclomatic complexity 50 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fetchLinkData (cyclomatic 49, cognitive 68) · ×1
  • Complex function fetchLinkData (cyclomatic 49, cognitive 68) REDACTED:668 — fetchLinkData has cyclomatic complexity 49 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function TagDetail (cyclomatic 49, cognitive 35) · ×1
  • Complex function TagDetail (cyclomatic 49, cognitive 35) apps/admin/src/tags/detail/tag-detail.tsx:54 — TagDetail has cyclomatic complexity 49 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getAction (cyclomatic 48, cognitive 61) · ×1
  • Complex function getAction (cyclomatic 48, cognitive 61) apps/admin/src/members/detail/member-event.ts:240 — getAction has cyclomatic complexity 48 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ProfilePage (cyclomatic 46, cognitive 40) · ×1
  • Complex function ProfilePage (cyclomatic 46, cognitive 40) apps/activitypub/src/views/profile/components/profile-page.tsx:58 — ProfilePage has cyclomatic complexity 46 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 46, cognitive 33) · ×1
  • Complex function (anonymous) (cyclomatic 46, cognitive 33) apps/shade/src/components/patterns/settings-modal.tsx:130 — (anonymous) has cyclomatic complexity 46 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 45, cognitive 42) · ×1
  • Complex function (anonymous) (cyclomatic 45, cognitive 42) apps/activitypub/src/views/preferences/components/profile.tsx:54 — (anonymous) has cyclomatic complexity 45 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function toggleCodeBlock (cyclomatic 44, cognitive 118) · ×1
  • Complex function toggleCodeBlock (cyclomatic 44, cognitive 118) koenig/kg-simplemde/src/js/simplemde.js:265 — toggleCodeBlock has cyclomatic complexity 44 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getAction (cyclomatic 43, cognitive 56) · ×1
  • Complex function getAction (cyclomatic 43, cognitive 56) apps/ember-admin/app/helpers/parse-member-event.js:194 — getAction has cyclomatic complexity 43 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded ghost/core/core/frontend/services/theme-engine/config/index.js — This repository declares test tooling, and the ✓ above records that declaration — but ghost/core/core/frontend/services/theme-engine/config/index.js and 190 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
R7 · Dead Code · Dead file (~1632 LoC) · ×1
  • Dead file (~1632 LoC) REDACTED — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~745 LoC) · ×1
  • Dead file (~745 LoC) apps/ember-admin/app/services/billing.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~661 LoC) · ×1
  • Dead file (~661 LoC) apps/ember-admin/app/components/gh-post-settings-menu.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~538 LoC) · ×1
  • Dead file (~538 LoC) apps/ember-admin/app/components/koenig-lexical-editor.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~476 LoC) · ×1
  • Dead file (~476 LoC) apps/ember-admin/app/helpers/parse-member-event.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~454 LoC) · ×1
  • Dead file (~454 LoC) apps/ember-admin/app/services/ajax.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~440 LoC) · ×1
  • Dead file (~440 LoC) apps/ember-admin/app/utils/publish-options.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/ember-admin/app/helpers/publish-options.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~395 LoC) · ×1
  • Dead file (~395 LoC) apps/ember-admin/app/services/state-bridge.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~389 LoC) · ×1
  • Dead file (~389 LoC) apps/ember-admin/app/components/posts/debug.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~370 LoC) · ×1
  • Dead file (~370 LoC) apps/ember-admin/app/components/gh-uploader.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~325 LoC) · ×1
  • Dead file (~325 LoC) apps/ember-admin/app/components/editor/publish-management.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/ember-admin/app/components/editor/modals/publish-flow/complete-with-email-error.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~321 LoC) · ×1
  • Dead file (~321 LoC) apps/ember-admin/mirage/config/members.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/ember-admin/mirage/routes-test.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~319 LoC) · ×1
  • Dead file (~319 LoC) apps/ember-admin/app/components/gh-image-uploader.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~318 LoC) · ×1
  • Dead file (~318 LoC) apps/ember-admin/app/routes/application.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~299 LoC) · ×1
  • Dead file (~299 LoC) REDACTED — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~291 LoC) · ×1
  • Dead file (~291 LoC) apps/ember-admin/ember-cli-build.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~286 LoC) · ×1
  • Dead file (~286 LoC) apps/ember-admin/app/services/feature.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~281 LoC) · ×1
  • Dead file (~281 LoC) apps/ember-admin/app/components/multi-list/item.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~276 LoC) · ×1
  • Dead file (~276 LoC) apps/ember-admin/app/services/notifications.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~274 LoC) · ×1
  • Dead file (~274 LoC) apps/ember-admin/app/services/local-revisions.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~272 LoC) · ×1
  • Dead file (~272 LoC) apps/ember-admin/app/components/gh-koenig-editor-lexical.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~263 LoC) · ×1
  • Dead file (~263 LoC) apps/ember-admin/app/services/unsplash.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~262 LoC) · ×1
  • Dead file (~262 LoC) apps/ember-admin/app/components/koenig-image-editor.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~251 LoC) · ×1
  • Dead file (~251 LoC) apps/ember-admin/app/services/custom-views.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~240 LoC) · ×1
  • Dead file (~240 LoC) apps/ember-admin/app/services/members-stats.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~231 LoC) · ×1
  • Dead file (~231 LoC) apps/ember-admin/app/routes/lexical-editor.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~223 LoC) · ×1
  • Dead file (~223 LoC) apps/ember-admin/app/components/gh-task-button.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~214 LoC) · ×1
  • Dead file (~214 LoC) apps/ember-admin/app/components/gh-context-menu.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~213 LoC) · ×1
  • Dead file (~213 LoC) apps/ember-admin/app/validators/post.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~212 LoC) · ×1
  • Dead file (~212 LoC) apps/ember-admin/app/components/editor/modals/preview/social.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~211 LoC) · ×1
  • Dead file (~211 LoC) apps/ember-admin/app/services/ui.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~208 LoC) · ×1
  • Dead file (~208 LoC) apps/ember-admin/app/utils/currency.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~207 LoC) · ×1
  • Dead file (~207 LoC) apps/ember-admin/app/components/gh-paginated-options.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (apps/ember-admin/app/components/gh-paginated-filter-select.js, apps/ember-admin/app/components/gh-paginated-token-input.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~206 LoC) · ×1
  • Dead file (~206 LoC) apps/ember-admin/app/services/session.js — no import path from any entry point (480 application, 477 tooling, 4262 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unlisted import 'express' · ×1
  • Unlisted import 'express' REDACTED:14 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unused dependency '@ember/jquery' · ×1
  • Unused dependency '@ember/jquery' — Declared in apps/ember-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@ember/optional-features' · ×1
  • Unused dependency '@ember/optional-features' — Declared in apps/ember-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@ember/render-modifiers' · ×1
  • Unused dependency '@ember/render-modifiers' — Declared in apps/ember-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity apps/signup-form/preview.html:22 — `http://localhost:2368/ghost/assets/signup-form/signup-form.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 6 such include(s) across the repository's markup.
Minor — 51 finding(s)
D10 · Test Quality · No direct assertions · ×20
  • No direct assertions: registerDefaultTransforms() registers all transforms koenig/kg-default-transforms/test/kg-default-transforms.test.ts:5 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: removes when only node in paragraph koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:10 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: removes when at start of paragraph koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:90 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: removes when at end of paragraph koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:189 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: removes when surrounded by text koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:288 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: removes when succeeded by period koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:396 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: can register without node loaded in editor koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:504 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: strips paragraph text-align koenig/kg-default-transforms/test/transforms/remove-alignment.test.ts:8 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles being called for a node that isn't registered in the editor koenig/kg-default-transforms/test/transforms/remove-alignment.test.ts:78 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles adjacent ULs koenig/kg-default-transforms/test/transforms/merge-list-nodes.test.ts:7 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles not having list nodes in the editor koenig/kg-default-transforms/test/transforms/merge-list-nodes.test.ts:155 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles images inside paragraphs koenig/kg-default-transforms/test/transforms/denest.test.ts:10 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles images inside lists koenig/kg-default-transforms/test/transforms/denest.test.ts:79 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles images inside nested lists koenig/kg-default-transforms/test/transforms/denest.test.ts:166 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles images in deeply nested paragraphs koenig/kg-default-transforms/test/transforms/denest.test.ts:384 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles headings+text inside list items koenig/kg-default-transforms/test/transforms/denest.test.ts:462 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: keeps original node when it also contains inline elements koenig/kg-default-transforms/test/transforms/denest.test.ts:587 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: splits paragraphs if image is in middle of paragraph koenig/kg-default-transforms/test/transforms/denest.test.ts:727 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: doesn't error when targetted node isn't loaded in editor koenig/kg-default-transforms/test/transforms/denest.test.ts:850 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: handles lists inside headings koenig/kg-default-transforms/test/transforms/denest.test.ts:892 — No conventional assertion call was detected, and 20 of 20 tests in `koenig/kg-default-transforms` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
D16 · Bus Factor · Off-boarding risk · ×9
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 27 significant file(s) lose their only recent owner: apps/admin-x-framework/src/utils/source-utils.ts, apps/shade/src/components/patterns/settings-modal.tsx, apps/admin/src/shared/analytics/chart-helpers.ts, apps/admin/src/settings/settings.screen.ts, apps/admin-x-framework/src/utils/currency.ts, apps/ember-admin/app/services/post-analytics.js, apps/admin/src/hooks/use-unsaved-changes-guard.ts, apps/shade/src/components/ui/code-editor-view.tsx (+19 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 20 significant file(s) lose their only recent owner: apps/admin/src/members/components/bulk-action-modals/import-members/custom-fields/mapping-step.tsx, ghost/core/core/server/services/members-metafields/definitions-service.ts, ghost/core/core/server/services/members-metafields/values-service.ts, ghost/core/core/server/services/members/import-export/export/exporter.ts, packages/metafield-types/src/index.ts, ghost/core/core/server/services/members/import-export/import/email-template.ts, apps/admin/src/members/detail/member-subscriptions-section.tsx, ghost/core/core/server/services/members-metafields/schema.ts (+12 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 16 significant file(s) lose their only recent owner: apps/shade/src/components/patterns/page-header.tsx, apps/shade/src/components/ui/command.stories.tsx, apps/shade/src/components/page-templates/list-page.stories.tsx, apps/shade/src/components/patterns/page-header.stories.tsx, apps/shade/src/components/ui/button.stories.tsx, apps/shade/src/components/ui/select.stories.tsx, apps/shade/src/components/patterns/gh-chart.tsx, apps/shade/src/components/ui/tooltip.stories.tsx (+8 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 12 significant file(s) lose their only recent owner: apps/portal/src/components/pages/gift-page.styles.js, ghost/core/core/server/services/gifts/gift-delivery-service.ts, koenig/kg-converters/src/lexical-to-mobiledoc.ts, apps/comments-ui/src/components/content/hooks/use-comment-navigation.ts, ghost/core/core/server/adapters/scheduling/signed-flush-scheduler.ts, apps/ember-admin/app/components/gh-members-recipient-select.js, ghost/core/core/server/services/gifts/gift-checkout-offer.ts, koenig/kg-card-factory/src/CardFactory.ts (+4 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 8 significant file(s) lose their only recent owner: ghost/core/core/server/services/content-import/import/importer.ts, ghost/core/core/server/services/content-import/import/post-data.ts, ghost/core/core/server/services/content-import/import/row.ts, apps/admin/src/settings/advanced/migration-tools/content-import/mapping.ts, apps/ember-admin/app/services/migrate.js, ghost/core/core/server/services/content-import/import/store.ts, ghost/core/core/server/services/content-import/csv/parse.ts, apps/ember-admin/app/components/gh-migrate-iframe.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 7 significant file(s) lose their only recent owner: apps/admin-x-framework/src/api/automations.ts, apps/admin/src/automations/components/canvas/email-performance-section.tsx, ghost/core/core/server/services/email-analytics/newsletter-email-analytics-batch-processor.js, ghost/core/core/server/services/automations/welcome-email-automation-poll.ts, ghost/core/core/server/data/schema/validator.ts, ghost/core/core/frontend/services/helpers/register-ghost-helpers.js, ghost/core/core/server/services/offers/application/offer-mapper.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 5 significant file(s) lose their only recent owner: ghost/core/scripts/prune.mts, ghost/core/core/server/services/adapter-manager/adapter-manager.ts, .pnpmfile.mjs, ghost/core/core/shared/config/secrets.ts, packages/adapters/sso-base/src/base.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 3 significant file(s) lose their only recent owner: ghost/core/core/server/services/route-settings/route-settings-parser.ts, ghost/core/core/frontend/services/routing/api-adapter.ts, ghost/core/core/server/services/route-settings/dynamic-routing-service.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 3 significant file(s) lose their only recent owner: apps/portal/src/utils/use-card-tilt.js, ghost/core/core/frontend/helpers/price.js, apps/activitypub/src/utils/screenshot.ts. Pair on, review, or document these before any departure.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D19 · Documentation Quality · Documentation · ×4
  • Documentation: no project overview README.md — The top-level README is mostly branding (Ghost.org links) plus a bare 'Quickstart install' section, offering no description of what the project does or its main value proposition. State the purpose and scope of the monorepo: self-hosting themes, API usage, end-to-end testing, editor support, and shared packages.
  • Documentation: no installation or build instructions README.md — The README has no install/build/run commands for the top-level repo. Add a one-line 'npm install' or 'yarn add' line plus bootstrap/pnpm dev steps, matching the scripts/README.md and the monorepo structure.
  • Documentation: written for insiders packages/_template/README.md — The internal workspace package golden path is referenced without context (what it represents or why it matters) inside the README, leaving a reader unable to tell whether this template package is truly private. Add a sentence explaining what the `@tryghost/{{NAME}}` packages are and their standing in the monorepo.
  • Documentation: written for insiders packages/checkout/README.md — The document names internal guards like `ghost/core/test/unit/se`, but no explanation of what they compare or why this checkout package is guarded. Add a sentence describing the two outside packages that the checkout package compares against and why it lives in its own guard.
D31 · IaC & Container Security · REDACTED IaC · ×2
  • REDACTED
  • REDACTED
D10 · Test Quality · Test project verifies nothing · ×1
  • Test project verifies nothing: koenig/kg-default-transforms koenig/kg-default-transforms/test/kg-default-transforms.test.ts:5 — No conventional assertion call was detected in 20 of 20 tests in `koenig/kg-default-transforms` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 7 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (115 single-owned of 1508 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1508 of the 3944 production source files in this repository met that bar). They are anonymized user #10 (4 file(s)), anonymized user #11 (3 file(s)), anonymized user #12 (2 file(s)), anonymized user #13 (2 file(s)), anonymized user #14 (1 file(s)), anonymized user #15 (1 file(s)) (+1 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 6 of 1508 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1508 of the 3944 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: ghost/core/core/server/services/newsletters/emails/verify-email.js, apps/ember-admin/app/components/koenig-image-editor.js, apps/ember-admin/app/components/multi-list/list.js, apps/ember-admin/app/components/editor/modals/publish-flow/complete-with-email-error.js, apps/ember-admin/app/services/modals.js, apps/ember-admin/app/helpers/gh-format-post-time.js. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 197511 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
R8 · Dependency Hygiene · Type-only dependency 'type-fest' in production deps · ×1
  • Type-only dependency 'type-fest' in production deps ghost/core/core/frontend/meta/og-type.ts:1 — Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene · Test-only dependency 'react-router' in production deps · ×1
  • Test-only dependency 'react-router' in production deps apps/admin/src/automations/automations.test.tsx:2 — Only test files import it — move it to devDependencies.
Minor — 286 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×166
  • Outdated (npm): @aws-sdk/client-s3 — @aws-sdk/client-s3 is pinned at 3.1079.0; registry.npmjs.org publishes 3.1140.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/lang-html — @codemirror/lang-html is pinned at 6.4.11; registry.npmjs.org publishes 6.4.12 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/lang-markdown — @codemirror/lang-markdown is pinned at 6.5.1; registry.npmjs.org publishes 6.5.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/search — @codemirror/search is pinned at 6.7.1; registry.npmjs.org publishes 6.7.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/state — @codemirror/state is pinned at 6.7.1; registry.npmjs.org publishes 6.7.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @dnd-kit/sortable — @dnd-kit/sortable is pinned at 7.0.2; registry.npmjs.org publishes 10.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @eslint/js — @eslint/js is pinned at 9.39.5; registry.npmjs.org publishes 10.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @faker-js/faker — @faker-js/faker is pinned at 10.5.0; registry.npmjs.org publishes 10.6.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @headlessui/react — @headlessui/react is pinned at 1.7.19; registry.npmjs.org publishes 2.2.10 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @hookform/resolvers — @hookform/resolvers is pinned at 5.4.0; registry.npmjs.org publishes 5.9.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @isaacs/ttlcache — @isaacs/ttlcache is pinned at 1.4.1; registry.npmjs.org publishes 2.1.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/clipboard — @lexical/clipboard is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/headless — @lexical/headless is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/html — @lexical/html is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/link — @lexical/link is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/list — @lexical/list is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/rich-text — @lexical/rich-text is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/selection — @lexical/selection is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/utils — @lexical/utils is pinned at 0.13.1; registry.npmjs.org publishes 0.51.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @octokit/core — @octokit/core is pinned at 7.0.7; registry.npmjs.org publishes 7.0.8 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @pnpm/releasing.versioning — @pnpm/releasing.versioning is pinned at 1100.2.4; registry.npmjs.org publishes 1100.3.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @pnpm/workspace.workspace-manifest-reader — @pnpm/workspace.workspace-manifest-reader is pinned at 1100.1.5; registry.npmjs.org publishes 1100.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-accordion — @radix-ui/react-accordion is pinned at 1.2.15; registry.npmjs.org publishes 1.2.20 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-alert-dialog — @radix-ui/react-alert-dialog is pinned at 1.1.18; registry.npmjs.org publishes 1.1.23 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-avatar — @radix-ui/react-avatar is pinned at 1.2.1; registry.npmjs.org publishes 1.2.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 141 more in this group — see findings.md.
D10 · Test Quality · Skipped (documented) · ×120
  • Skipped (documented): navigates to user settings when selecting a user apps/ember-admin/tests/acceptance/search-test.js:354 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): navigates to user settings when selecting a user apps/ember-admin/tests/acceptance/search-test.js:605 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): displays an alert and disables navigation when saving apps/ember-admin/tests/acceptance/error-handling-test.js:32 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): handles title validation errors correctly apps/ember-admin/tests/acceptance/editor-test.js:202 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): save shortcut works when tags/authors field is focused apps/ember-admin/tests/acceptance/editor-test.js:542 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): disables template selector if slug matches slug-based template apps/ember-admin/tests/acceptance/custom-post-templates-test.js:100 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): handles timezones correctly when scheduling apps/ember-admin/tests/acceptance/editor/publish-flow-test.js:180 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can publish apps/ember-admin/tests/acceptance/editor/publish-flow-test.js:561 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can schedule publish apps/ember-admin/tests/acceptance/editor/publish-flow-test.js:562 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): handles server error when confirming apps/ember-admin/tests/acceptance/editor/publish-flow-test.js:786 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): saves on content change apps/ember-admin/tests/acceptance/editor/lexical-test.js:78 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): loads new photos by default apps/ember-admin/tests/integration/components/gh-unsplash-test.js:24 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): has responsive columns apps/ember-admin/tests/integration/components/gh-unsplash-test.js:25 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can zoom apps/ember-admin/tests/integration/components/gh-unsplash-test.js:26 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can close zoom by clicking on image apps/ember-admin/tests/integration/components/gh-unsplash-test.js:27 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can close zoom by clicking outside image apps/ember-admin/tests/integration/components/gh-unsplash-test.js:28 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): triggers insert action apps/ember-admin/tests/integration/components/gh-unsplash-test.js:29 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): handles errors apps/ember-admin/tests/integration/components/gh-unsplash-test.js:30 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): works apps/ember-admin/tests/integration/components/gh-unsplash-test.js:33 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): handles no results apps/ember-admin/tests/integration/components/gh-unsplash-test.js:34 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): handles error apps/ember-admin/tests/integration/components/gh-unsplash-test.js:35 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): triggers close action apps/ember-admin/tests/integration/components/gh-unsplash-test.js:39 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can be triggered by escape key apps/ember-admin/tests/integration/components/gh-unsplash-test.js:40 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): cannot be triggered by escape key when zoomed apps/ember-admin/tests/integration/components/gh-unsplash-test.js:41 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): triggers insert action apps/ember-admin/tests/integration/components/gh-unsplash-photo-test.js:109 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • + 95 more in this group — see findings.md.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-cf3f014879d64ade962556f4e22cd37f/history.json --exit-code 0 --source .7artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-cf3f014879d64ade962556f4e22cd37f/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .934artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update2artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .15artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .5artifacts/raw/semgrep-gdpr.json
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0d82f-f962-748b-8a1e-f449fa463b58 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md