The Hypothesis
SEO plugins are written for everybody. Code written for everybody is optimized for nobody. What happens when you strip them out and write the exact same SEO logic yourself — but only the parts you actually need?
This experiment started not from theory but from frustration. I was building the WordPress theme for Dwi Yanti SEO Specialist from scratch — pure hand-coded PHP, no template, no page builder. When I looked at what Yoast and RankMath were actually outputting into the HTML head, I'm realized something: it was all reproducible. Every tag, every structured data block, every canonical — it was just PHP conditionals and wp_head hooks.
So I made a decision with SEO Strategy: do it myself. And then track what Google did in response.
What Plugins Actually Do (That You Can Replicate)
Before the experiment, I audited exactly what both Yoast SEO and RankMath were generating in the HTML source of a standard WordPress site. The output breaks down into six functional categories:
| SEO Function |
Plugin Output |
Custom Code Equivalent |
| Title Tag |
<title> generated via plugin filters |
remove_theme_support('title-tag') + custom wp_head action |
| Meta Description |
Plugin reads custom field per post |
Custom post meta field + wp_head output via conditional |
| Canonical URL |
Plugin outputs <link rel="canonical"> |
Custom function using get_permalink(), is_paged(), home_url() |
| Robots Meta |
Plugin generates noindex/nofollow per page setting |
wp_robots filter with conditional logic per page type |
| Open Graph |
Plugin outputs og: tags per post |
Custom wp_head hook with get_post_thumbnail_url() etc. |
| Structured Data |
Plugin outputs JSON-LD based on settings |
Custom wp_head hook with per-template JSON-LD arrays |
These results were observed directly on Dwi Yanti, where plugin-based SEO was replaced entirely with custom code.
Every single function is reproducible. None of it requires a plugin. The plugin just provides a UI for non-coders to configure these outputs. If you can write PHP, the UI is unnecessary overhead.
What Plugins Add That You Don't Need
Here is what I found in the page source after auditing a plugin-enabled WordPress installation on Dwi Yanti’s website — outputs that were loading on every page, contributing nothing to SEO:
- Plugin admin bar UI assets loaded on frontend (CSS + JS)
- Multiple
preload directives for plugin-specific resources
- Redundant Open Graph tags overlapping with theme output
- Schema markup for post types irrelevant to the site's content type
- Database queries on every page load to check plugin settings
- JavaScript handles registered but never used on most pages
None of these help rankings, bad SEO Strategist approach. All of them add weight. And in a world where Core Web Vitals are a ranking factor, every unnecessary HTTP request and every additional database query costs you something.
Experiment Note
After removing the SEO plugin and replicating its output in custom code, the page source dropped from 187 lines of head content to 61 lines. Total HTML head size reduced by approximately 68%. First Contentful Paint improved by 0.4 seconds on the tested pages.
How I Replaced the Plugin: The Code Architecture
Everything lives in functions.php. Here is the logical structure I built, in the order of implementation:
01
Remove Default Title Tag Control
First, disable WordPress's default title handling so the plugin (and later your custom code) has full control:
functions.php
remove_theme_support('title-tag');
add_action('wp_head', 'dw_custom_title_tag', 1);
function dw_custom_title_tag() {
if (is_single() || is_page()) {
$title = get_the_title() . ' — Dwi Yanti';
} elseif (is_archive()) {
$title = single_cat_title('', false) . ' — SEO Insights';
} elseif (is_home()) {
$title = 'Technical SEO Specialist & Strategist — Dwi Yanti';
} else {
$title = get_bloginfo('name');
}
echo '<title>' . esc_html($title) . '</title>' . "\n";
}
02
Canonical URL with Pagination Handling
The most common canonical error in WordPress: technical SEO implementationpaginated archives generating duplicate canonicals. This is also where most SEO plugins fail silently.
functions.php
add_action('wp_head', 'dw_canonical_url', 2);
function dw_canonical_url() {
if (is_singular()) {
$canonical = get_permalink();
} elseif (is_home() && !is_paged()) {
$canonical = home_url('/blog/');
} elseif (is_category() && !is_paged()) {
$canonical = get_category_link(get_queried_object_id());
} elseif (is_paged()) {
$canonical = get_pagenum_link(get_query_var('paged'));
} else {
$canonical = home_url($_SERVER['REQUEST_URI']);
}
echo '<link rel="canonical" href="' . esc_url($canonical) . '" />' . "\n";
}
03
Robots Meta via wp_robots Filter
The wp_robots filter (introduced in WordPress 5.7) is the correct, future-safe way to control robots meta. Using it properly means you never accidentally noindex content you want ranked.
functions.php
add_filter('wp_robots', 'dw_custom_robots');
function dw_custom_robots($robots) {
if (is_category() && is_paged() && get_query_var('paged') > 2) {
$robots['noindex'] = true;
$robots['follow'] = true;
unset($robots['max-image-preview']);
} elseif (is_tag()) {
$robots['noindex'] = true;
$robots['follow'] = true;
} else {
$robots['index'] = true;
$robots['follow'] = true;
$robots['max-image-preview'] = 'large';
}
return $robots;
}
04
JSON-LD Structured Data Per Template
Instead of a plugin guessing what schema to output, I write the exact schema needed per template. For single posts: Article. For service pages: Service. For the homepage: Person + WebSite. For category archives: CollectionPage.
functions.php (excerpt)
add_action('wp_head', 'dw_structured_data', 5);
function dw_structured_data() {
if (is_single()) {
$schema = [
'@context' => 'https://schema.org',
'@type' => 'Article',
'headline' => get_the_title(),
'author' => [
'@type' => 'Person',
'@id' => 'https://me.dwiyanti.com/#person',
'name' => 'Dwi Yanti'
],
'datePublished' => get_the_date('c'),
'dateModified' => get_the_modified_date('c'),
'mainEntityOfPage' => get_permalink()
];
echo '<script type="application/ld+json">'
. wp_json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
. '</script>';
}
// Additional conditions for other page types...
}
The Results: What Google Did
I monitored both sites — Dwi Yanti’s main site (my personal portfolio) and the Abdul Majid 25 Urban Residence site — for 3+ months after the plugin removal and custom code implementation. These were the measurable outcomes:
Before Plugin-Based SEO
- Title tag conflicts on paginated archives (paged pages showing base title)
- Canonical errors on tag archives
- Plugin-generated schema missing custom fields
- Page speed score: 71–79 (mobile)
- HTML head: ~187 lines
- Site ranking: Page 1, Rank 4–6 for primary keywords
- 0 Google AI Overview appearances
After Custom Code SEO
- Correct title on all paginated archives (verified via URL Inspection)
- Canonical accurate per page type — zero duplication
- Schema matches exact content context per template
- Page speed score: 88–95 (mobile)
- HTML head: ~61 lines
- Site ranking: Page 1, Rank 1–4 — with continued improvement
- Multiple Google AI Overview appearances for targeted queries
The most significant change was not ranking position — it was the Google AI Overview appearances. The Urban Residence site began surfacing in AI Overviews for queries like "kost eksklusif Jakarta Selatan fasilitas lengkap." The portfolio site appeared in AI Overviews for SEO specialist-related queries.
This is not coincidental. AI Overviews pull from pages with precise, well-structured schema, clear topical authority, and fast, technically clean pages. All three improved after removing the plugin overhead and replacing it with purpose-built structured data.
Experiment Finding
Google AI Overview eligibility is strongly correlated with correct, specific structured data — not just presence of schema markup. A generic Article schema from a plugin is less effective than a hand-coded Article schema with accurate datePublished, author @id, and mainEntityOfPage that match your actual site structure.
What This Experiment Taught Me About SEO Plugins
I am Dwi Yanti Technical SEO Specialist not saying SEO plugins are bad. For someone without development capability, they are better than nothing. But there is a fundamental misunderstanding in how most people use them: they treat plugin output as the goal, when it is only a shortcut to the goal.
The actual goal after SEO optimization expert is clean, accurate HTML signals in the page source. A plugin is one way to get there. Custom code is another. The difference is precision — and precision, at the level of individual page types, individual schema properties, individual canonical edge cases, is what separates a site that ranks from a site that dominates.
01
Plugins optimize for the average site. You are not average.
Every WordPress site is different. Plugin defaults are set for the most common case. Your site may not be the most common case.
02
Structured data quality matters more than presence.
Google validates schema. Missing required properties, incorrect @type, or schema that doesn't reflect actual page content is treated as low-quality signal.
03
Page speed is an SEO variable, not a separate concern.
Plugin overhead reduces page speed. Page speed affects Core Web Vitals. Core Web Vitals affect rankings. The chain is direct.
04
Control enables iteration. Iteration enables optimization.
When I own the SEO code, I can change a single canonical rule in 30 seconds. With a plugin, I navigate settings UIs, clear caches, hope the plugin handles edge cases correctly. This is how SEO Specialist execution operates in practice.
The Honest Caveat: This Requires Real Technical Skill
This approach requires real technical capability. As
Dwi Yanti, I want to be direct about something: this approach requires you to actually understand WordPress PHP, its hooks system, its conditional functions, and how HTML head output works. If you remove an SEO plugin without replacing its output correctly, you will likely lose rankings — not because custom code is worse, but because incomplete custom code is worse than complete plugin code.
The prerequisite skill set:
- Comfort reading and writing PHP conditionals and WordPress functions
- Understanding of WordPress hook system (
add_action, add_filter)
- Ability to validate output using browser DevTools (View Source)
- Access to Google Search Console for URL Inspection post-change
- Familiarity with schema.org vocabulary and Google's Rich Results Test
If you have these — or you work with someone who does — the plugin-free approach is technically superior. If you do not, a well-configured SEO plugin is still a valid path. The goal is not to avoid plugins out of principle. The goal is accurate, efficient SEO output.
Questions From This Experiment
Is it safe to remove SEO plugins from a WordPress site?
Yes, if you replace their output with equivalent custom code before deactivating the plugin. The process: write your custom functions first, verify their output in the browser source, then deactivate the plugin and verify again that the output is unchanged. Never deactivate first and code later.
Will removing Yoast or RankMath hurt my rankings?
Not if the transition is done correctly. Google reads HTML output — it does not care which tool generated it. If your title tags, canonicals, meta descriptions, and structured data remain correct and present after the plugin is removed, rankings are unaffected. In this experiment, rankings improved due to page speed gains from reduced plugin overhead.
What SEO functions does functions.php need to replace a plugin?
Minimum replacement functions: custom title tag output (remove title-tag theme support, add custom wp_head action), canonical URL generation with correct pagination handling, meta description output from post meta, robots meta via wp_robots filter, Open Graph tags, and JSON-LD structured data per template type. XML sitemap can be handled by WordPress core's built-in sitemap (enabled by default in WP 5.5+) without a plugin.
Can this approach help with Google AI Overviews?
Based on this experiment, yes — indirectly. AI Overviews favor pages with precise, validated structured data, high topical authority, and fast page speed. Custom-coded schema is more precisely targeted than generalized plugin output. When combined with strong content, the technical precision appears to contribute to AI Overview eligibility.
Technical SEO That Goes Beyond the Plugin UI
If your site has been running on plugin defaults and you suspect there are precision gains to be made at the code level, let's look at it together.
This is exactly what Dwi Yanti — SEO Specialist does at a technical level.
Label:
SEO Experiments
By:
Dwi Yanti on April 6, 2026