Claude Opus 4.7 dropped two days ago. The HN thread had opinions in both directions, some developers called it a clear step up, others pointed at the tokenizer cost analysis and said it was a step sideways with a bigger bill. The Reddit thread titled something close to “Opus 4.7 is terrible and Anthropic dropped the ball” hit the top of r/artificial within hours.

My job is not to referee the general debate. My job is to figure out if this model is better for the work I actually do: WordPress plugin development across a 100-plugin portfolio. This post is the early analysis: what 4.7 changes vs 4.6 for WordPress-specific work, the prompt patterns that land best on WP codebases, the tokenizer cost question, the actual workflows I am running, and an honest first verdict.

The WordPress Plugin Evaluation Criteria

Generic coding benchmarks do not answer the questions WordPress plugin developers actually have. WordPress work has its own shape, lots of procedural PHP, hook-driven architecture, idiomatic patterns around sanitization, nonces, capabilities, REST endpoints, block registration, and a sprawling ecosystem of APIs. A model that is good at React components in isolation may or may not be good at the weirder corners of a real WordPress plugin.

The evaluation categories that matter:

  • Refactoring hook-driven PHP without breaking priority ordering or callback argument counts.
  • Reasoning about long plugin files (2,000-5,000 lines) without losing track of cross-function dependencies.
  • Preserving security boundaries (nonces, capability checks, sanitization) through refactors.
  • Generating PHPUnit and Playwright tests that actually pass on first run.
  • Working with WordPress’s specific APIs (WP_Query, REST API, block registration, options, transients) idiomatically.
  • Migrating between deprecated and current WordPress patterns.
  • Reading and writing block.json metadata correctly with the latest schema.
  • Generating idiomatic Gutenberg block code in edit.js, save.js, and view.js.

What Changed vs 4.6

Based on the initial community reports and public discussion, here are the four areas where the delta matters most for WordPress work.

1. Long-context reasoning

Opus 4.7’s context handling is meaningfully improved on paper and in the generic benchmarks. For WordPress plugin work, this matters because real plugin files can be 4,000-5,000 lines and refactoring them requires holding the full file in context alongside related files (hook callers, REST routes, template includes).

Community reports suggest 4.7 is more willing to reason across long contexts without losing earlier details, a common 4.6 failure mode was forgetting what was defined earlier in a long file. If this holds up in your specific workflows, it is a real win for plugin refactoring.

A concrete test pattern: paste a 3,000-line plugin file and ask the model to refactor a function 2,500 lines in. Then ask it to also update every caller of that function. 4.6 frequently missed callers in the upper portion of the file. Early reports on 4.7 suggest this happens less often.

2. Code comprehension on procedural PHP

WordPress plugins are mostly procedural PHP with some OOP layered on top. The hook system in particular (add_action, add_filter, priority ordering, callback argument counts) is code that is cognitively heavy for a human but should be trivial for a good model to reason about.

Early signal: 4.7 appears more consistent about hook registration details than 4.6. Hook priorities and callback argument counts get preserved through refactors more reliably. This is worth testing in your own workflow, give 4.7 a hook-heavy plugin and a refactor task, compare the output to 4.6 on the same prompt.

3. Security-aware refactoring

WordPress plugin work is security-sensitive. A model that suggests a fix but removes a capability check, or refactors a REST endpoint without preserving the nonce verification, is worse than a slower model that keeps the security boundaries intact.

The general guidance with any new model: do not assume security boundaries are preserved. Review every refactor output for nonce verification, capability checks, and input sanitization before accepting. This is true for 4.7, it was true for 4.6, and it will be true for the next version.

A practical guardrail: ask the model to explicitly flag every line where it added, modified, or removed a security check before accepting the refactor. This forces the model to surface the risk areas itself.

4. Test generation

Writing PHPUnit tests, Playwright tests, and JavaScript unit tests for plugins is a substantial chunk of the value you get from a coding model. 4.6 was usable but often needed heavy editing to make tests pass in a real WordPress test environment.

Early reports on 4.7 suggest the first-run pass rate for generated tests is higher. For WordPress plugin authors running PHPUnit against real WordPress installations, this is the category where a meaningful improvement translates directly to hours saved.

Prompt Patterns That Work

Two days is enough time to see which prompt shapes produce usable plugin code and which produce verbose filler that wastes time.

Pattern: Load the plugin context explicitly

Start the conversation with the plugin’s CLAUDE.md (if you have one), the directory structure, and the specific file you are working in. 4.7 seems particularly sensitive to having this context loaded in a deliberate order at the start rather than scattered through the conversation.

A good context load looks like:

# Plugin: BuddyPress Moderation Pro
Directory structure: [tree output]
CLAUDE.md: [contents]
File in scope: includes/class-moderation-engine.php
Related files: includes/class-moderation-rules.php

Task: refactor flag_content() to support batch flagging
Constraints: preserve all security checks, maintain hook priorities, keep backward compatibility on the public API

Pattern: Ask for the smallest change that solves the problem

Anthropic’s system guidance emphasizes minimal scoping. In practice, on WordPress plugin code, explicitly asking for “the smallest change that fixes this specific bug without touching surrounding code” produces much tighter diffs than general “fix this bug” prompts.

Pattern: Name the WordPress API you expect it to use

WordPress has many ways to do the same thing. get_option vs WP_Query vs direct $wpdb. Transients vs object cache. REST vs admin-ajax. Naming the API you expect in the prompt eliminates a lot of meandering responses.

Bad prompt: “Cache this value for 5 minutes.”

Good prompt: “Cache this value using set_transient() with a 5-minute expiration. Use wp_cache_set as a faster object-cache layer when an object cache is available.”

Pattern: Provide the failing test first

If you have a failing PHPUnit test, paste it into the prompt before asking for the fix. 4.7 seems to respond well to test-driven framing, it writes the fix, not a generic explanation of what might be wrong.

Pattern: Reference the existing plugin conventions

WordPress plugin codebases have their own conventions, function prefixes, class namespaces, directory structure, file naming. Naming the conventions up front produces code that fits the plugin instead of generic WordPress code you have to rewrite to match.

Pattern: Constrain the diff format

For multi-file refactors, ask for the output as unified diffs rather than full file rewrites. The diff format makes review faster and lets you apply changes selectively.

The Tokenizer Cost Question

One of the top HN threads this week is about Opus 4.7’s tokenizer costs. The claim: 4.7’s tokenizer produces more tokens for equivalent input than 4.6, which directly translates to higher API costs for the same work.

For plugin development specifically, the token-heavy inputs are:

  • Large plugin files pasted into context.
  • Whole-repository context for refactoring tasks.
  • Long test output pasted back for debugging.

If the tokenizer change is real and meaningful, plugin authors running 4.7 at scale should expect higher API bills for equivalent work. The practical question is whether the quality improvements outweigh the cost increase.

For heavy users doing multi-hour refactoring sessions across large plugins, even a 10-15% token increase adds up. For occasional users asking 4.7 to fix specific bugs, the cost delta is small enough to not matter.

Anthropic has historically reduced costs over time as models mature. If 4.7’s cost profile is higher at launch, expect it to come down over the next few months.

How to estimate your specific cost impact

The simplest way to estimate is to take a representative day of API usage and re-run it (or a sample of it) on both models, comparing total token consumption. If you are using Claude Code or another wrapper, the token counts are usually surfaced in the response metadata.

For an agency running serious plugin work, a $200-500/month delta in API spend is probably worth it for the productivity gain. For a solo developer asking occasional questions, the delta may not be material either way.

Where Opus 4.7 Struggles

No model is uniformly better. Three areas where early community reports suggest 4.7 still has gaps:

Novel framework territory

4.7 is trained on a fixed cutoff of data. For very new APIs, very new frameworks, or WordPress features that shipped after the training cutoff, the model may confidently produce code that looks right but uses deprecated or non-existent patterns. Always verify API usage against current documentation when working on bleeding-edge territory.

Highly opinionated code style

If your plugin has idiosyncratic style conventions that do not match common WordPress patterns, 4.7 tends to default to common conventions even when you asked it to match yours. Loading a style guide explicitly helps, but does not eliminate the drift.

Debugging without reproduction

4.7 is strong when given a clear reproduction case. When asked to debug something based only on a vague description of what is happening, it still speculates more than a human debugger would. Give it the actual error, the actual stack trace, the actual input, not a summary.

Multi-plugin reasoning

When a fix in plugin A requires understanding plugin B (a common scenario in BuddyPress + WooCommerce stacks), 4.7 sometimes loses track of which plugin owns which function. Loading both plugin contexts explicitly with clear separation helps but does not eliminate confusion.

Integration With Claude Code and MCP

The model on its own is one thing. The integration into your dev environment matters more for daily plugin work.

If you are using Claude Code, 4.7 plus your usual MCP server stack is the configuration to test. The combination of long-context reasoning and tool use (filesystem, GitHub, Playwright, WP-CLI MCPs) is where the productivity gains compound.

For WordPress plugin work specifically, the MCP servers I use daily:

  • Filesystem MCP for direct read/write to plugin files.
  • WP-CLI MCP or custom server for running commands against local Local-by-Flywheel sandboxes.
  • Playwright MCP for browser-based test generation and visual verification.
  • GitHub MCP for PR creation and issue cross-referencing.
  • Plugin-specific MCPs for Basecamp project tracking, Wbcom internal docs.

4.7’s better long-context reasoning makes it more effective at orchestrating these tools across a multi-step refactor. 4.6 sometimes lost the thread when a refactor required reading filesystem, querying database via wp-cli, and updating multiple files in sequence. Early reports suggest 4.7 holds the thread better.

The Early Verdict

Opus 4.7 is a real step up for WordPress plugin work in the categories that matter most: long-context refactoring, hook-driven PHP, and test generation. The tokenizer cost question is real but probably not decisive for most plugin authors, the quality delta is worth the potential cost delta for the kinds of work where 4.7 is actually better.

If you are doing serious WordPress plugin development and your work includes refactors, test writing, and debugging across large codebases, switching to 4.7 is worth the test. If your work is mostly small, bounded bug fixes, the delta will be less visible and you can stay on 4.6 until cost curves settle.

Model Selection Decision Framework

For WordPress plugin authors deciding which model to use:

WorkloadRecommendation
Quick bug fixes (under 200 LOC)Opus 4.6 or Sonnet 4.6, cost-effective, quality difference is minimal
Multi-file refactorsOpus 4.7, long-context reasoning is the differentiator
Test suite generationOpus 4.7, first-run pass rate matters
Block editor (Gutenberg) workOpus 4.7, block.json schema and React patterns
Security reviewOpus 4.7, better at flagging missing checks
Quick docs / changelog writingSonnet 4.6 or Haiku 4.5, fast and cheap

What I Am Testing Next

Forty-eight hours is a first pass, not a complete evaluation. The things worth testing over the next two weeks:

  • Long-running refactors across multiple sessions, does 4.7 hold the plugin’s conventions across a sprint?
  • Multi-plugin reasoning, when a fix in plugin A requires understanding plugin B, how does 4.7 handle that scope?
  • Block development specifically, Gutenberg block work is a distinct domain within WordPress; is 4.7 better at block.json and edit.js?
  • Test-suite fluency, running 4.7 as the author of a full test suite for a new plugin and seeing what the pass rate is without hand-correction.
  • BuddyPress-specific patterns, the BP plugin has its own ecosystem of hooks and filters that may be underrepresented in training data.
  • Cost tracking, dollar amounts spent per equivalent work unit on 4.7 vs 4.6.

I will update this post with the two-week results. In the meantime, if you are doing serious WordPress work with Opus 4.7, share your observations. A dozen field reports from plugin developers is more useful than a single benchmark.

How to Test It Yourself in One Hour

If you want a quick personal evaluation instead of reading more takes:

  1. Pick a plugin you know well and a task you have been putting off, a refactor, a bug fix, a test you never wrote.
  2. Start a conversation with 4.7, load the plugin context, and ask for the task.
  3. Track time-to-working-code. How many iterations did it take? How many things did you fix by hand after?
  4. Repeat the same task pattern on 4.6 with a fresh conversation.
  5. Compare. Look at quality, time, and token consumption.

Your specific workflow will teach you more than any benchmark from a blog post.

Practical Setup Tips

If you decide to switch to 4.7 for serious plugin work:

  • Update your Claude Code or API client to use the 4.7 model identifier.
  • If you have prompt templates or system prompts tuned for 4.6, retest them on 4.7. Some prompt patterns that worked on 4.6 produce different output on 4.7.
  • Watch your API spend dashboard for the first two weeks to catch unexpected cost increases.
  • Keep 4.6 as a fallback for cost-sensitive workflows (bulk content generation, batch refactors across many small files).
  • Document the prompt patterns that work best for your codebase. Share them with your team.

The model is a tool. Better tools amplify good engineering practices and amplify bad ones. Use 4.7 with the same code review discipline you would use with 4.6.

Comparison With Sonnet 4.6 for Mixed Workflows

Most plugin work does not need the most capable model on every prompt. A pragmatic split for a typical day:

  • Sonnet 4.6 for boilerplate: scaffolding new files, generating CRUD endpoints from a spec, writing initial readme.txt content, drafting changelog entries, generating PHPDoc blocks. Sonnet handles these well at lower cost and latency.
  • Opus 4.7 for cognitively expensive work: refactoring across multiple files, debugging non-obvious issues, writing test suites where first-run pass rate matters, security review.
  • Haiku 4.5 for batched simple tasks: tagging, classification, content extraction, anything that runs many times in parallel.

The cost savings from this split are significant. If you run every prompt through Opus 4.7 you will see your API bill double or triple compared to a smart split. The quality cost from running boilerplate through Sonnet is negligible.

For agency teams, building a router into your internal tooling that picks the right model per prompt type pays back within a month of moderate use. Even a simple heuristic (‘refactor or test = Opus, scaffold or doc = Sonnet, batch = Haiku’) captures most of the available savings.

The Bigger Picture for WordPress Plugin Authors

The combination of better models, better dev tooling (Claude Code, MCP servers), and a maturing WordPress block editor ecosystem means plugin development in 2026 looks fundamentally different than it did three years ago. The plugin authors who internalize this shift will ship faster, ship better, and have lower support burden because the AI-assisted code is also better tested.

The plugin authors who treat AI as a search-engine replacement and copy-paste output without review will continue to produce the security-flawed plugins that show up in vulnerability roundups. The model is not the variable; the discipline around using it is.