WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by optimatioseo v1.0.2

Source Lens

Source Lens – Code Finder is the ultimate code search tool for WordPress. It helps developers and site owners locate where any code lives in their Wor …

Source Lens

The facts

Active installs
200+
Price
Free
Last updated
15 Jan 2026
Added
Jan 2026
Requires WP
5.8
Tested up to
WP 6.9.7
Requires PHP
7.4
Downloads
945

Our analysis

AI-assisted

Source Lens – Code Finder is a WordPress plugin designed for developers and site owners to locate code within their WordPress installations. It allows you to search for code snippets, functions, hooks, and more across themes, plugins, and the database, making it easier to manage and understand your site's codebase.

The plugin offers two main search modes: one for finding specific code strings and another for locating files by name. It supports various search types and can detect dynamically injected code, providing a comprehensive tool for anyone needing to navigate complex WordPress setups.

Best for: This plugin is suitable for developers and advanced users managing complex WordPress sites.

What it does well

  • Search across themes, plugins, and the database
  • View full source code of files instantly
  • Detects dynamically injected code from other plugins
  • Supports multiple search types including regex
  • Safe and read-only, does not modify server files

Where it falls short

  • Limited information on user ratings and feedback
  • May have a learning curve for new users

Verdict

Source Lens – Code Finder is a useful tool for those who need to search and manage code within WordPress. Its comprehensive search capabilities make it beneficial for developers working with multiple themes and plugins.

From the developer

optimatioseo's own description of Source Lens, lightly tidied.

Source Lens – Code Finder is the ultimate code search tool for WordPress. It helps developers and site owners locate where any code lives in their WordPress installation – whether it’s in theme files, plugin files, the database, or even dynamically injected by other plugins.

Two Powerful Search Modes

1. Find Code/Strings – Search for any text, function, hook, shortcode, or code snippet inside files. Perfect for finding where a specific piece of code is used.

2. Find File by Name – Search for files by their name (e.g., header.php, functions.php, style.css) and view their full source code instantly.

Key Features

  • Search Everywhere – Search across themes, plugins, WordPress core, and the database
  • View Full Source Code – Find any file by name and view its complete source code
  • Find Dynamically Injected Code – Detects code added by other plugins (like Google Tag Manager scripts from code snippet plugins)
  • Multiple Search Types – Auto-detect, text string, function, hook, shortcode, class, regex, constant, CSS, and HTML
  • Page Builder Support – Search inside Elementor, Divi, Beaver Builder, and Gutenberg blocks
  • WooCommerce Support – Search products, orders, settings, and WooCommerce-specific data
  • Code Snippets Detection – Finds code stored in popular snippet plugins (WPCode, Code Snippets, Insert Headers and Footers, etc.)
  • Safe & Read-Only – Never modifies any files on your server

Short Description

Find where code lives in WordPress. Search functions, hooks, shortcodes and strings across themes and plugins.

How to Use

Finding Code or Text Strings

  1. Go to Tools → Source Lens – Code Finder
  2. Make sure “Find Code/Strings” mode is selected (default)
  3. Enter your search query. Examples:
    • add_action – Find all uses of the add_action function
    • wp_enqueue_script – Find where scripts are enqueued
    • GTM-XXXXXX – Find your Google Tag Manager container ID
    • [contact-form] – Find where a shortcode is used
    • Any text or code snippet you want to locate
  4. Choose a Search Type (Auto Detect works for most cases)
  5. Choose a Search Scope (Everything, specific theme, specific plugin, etc.)
  6. Click Search to find all matches

Finding Files by Name

  1. Go to Tools → Source Lens – Code Finder
  2. Click “Find File by Name” mode
  3. Enter a file name. Examples:
    • header.php – Find all header.php files
    • functions.php – Find all functions.php files
    • style.css – Find all style.css files
    • elementor – Find all files with “elementor” in the name
  4. Click Search to see matching files
  5. Click “View Source Code” on any file to see its full contents

Advanced Options

  • Case Sensitive – Match exact letter casing
  • Whole Word – Only match complete words
  • Regex Mode – Use regular expressions for complex patterns
  • Search Encoded – Find base64 encoded content
  • Search Runtime – Find dynamically injected code from other plugins

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for developer tooling.

WPCode

WPCode

93

Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditio...

Free 3M+ installs 4.9★ (1,873)
Header Footer Code Manager

Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for an...

Free 600k+ installs 4.9★ (309)
Admin and Site Enhancements

Duplicate post, post order, image resize, email via SMTP, admin menu editor, custom css / code, disable gutenb...

Free 200k+ installs 5★ (421)
Shortcoder

Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes wit...

Free 100k+ installs 4.9★ (227)
Insert PHP Code Snippet

Add PHP code to your pages and posts easily using shortcodes.

Free 90k+ installs 4.9★ (705)
Code Snippets

An easy, clean, and simple way to enhance your site with code snippets.

Free 1M+ installs 4.7★ (509)