Skip to content

System task: Theme/asset audit (enqueued scripts and styles) #496

@chubes4

Description

@chubes4

Context

Bloated themes are one of the top structural performance issues on WordPress sites — unused CSS, render-blocking scripts, excessive enqueued assets. DM's PageSpeed integration can detect the symptoms, but there's no system task that inspects the WordPress side directly.

Proposed

wp datamachine assets diagnose — audit enqueued scripts and styles:

  • List all enqueued scripts/styles with their source, size, and dependencies
  • Flag render-blocking assets
  • Identify assets loaded on every page that are only needed on specific pages
  • Detect duplicate/redundant libraries (e.g. jQuery loaded alongside a framework that bundles it)
  • Show total asset weight per page template

This is a diagnose-only task — the fix side is more nuanced (dequeuing a script could break functionality), so it should surface actionable information that an AI step or agent can reason about.

Why

"Bloated themes" is vague when you're staring at a WordPress admin. This turns it into concrete data: which scripts, how big, where they're loaded, and whether they're blocking rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions