WP Manifestindependent plugin directory
manifest / developer / devxpert

DevXpert - WordPress Developer Tools

A developer-centric WordPress plugin that provides visual inspection tools, hook locators, debugging helpers, and productivity boosters for WordPress and WooCommerce development.

by nftushar · github.com/nftushar/devxpert · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/nftushar/devxpert/archive/refs/heads/main.zip

A comprehensive WordPress plugin designed specifically for developers working with WordPress and WooCommerce. DevXpert provides visual inspection tools, hook locators, debugging helpers, and productivity boosters to streamline your development workflow.

🚀 Features

1. Woo Hook Inspector

  • Visual overlay of all hooks (do_action, apply_filters) on front-end
  • Works across all templates: WooCommerce, theme templates, etc.
  • Hover to view:
    • Hook name
    • Hook type (action / filter)
    • Priority & attached functions
  • Click to:
    • Copy hook name
    • Inject test content (for action hooks)
    • Open hook context (see which plugin/theme added it)

2. Hook Logger Panel

  • Admin toolbar dropdown or standalone admin page
  • Logs:
    • Hooks fired on the current page
    • Callback functions, with priority and origin
    • Time taken (performance profiling)

3. Function Tracer

  • Find where a function is defined (theme or plugin)
  • Search WordPress core, plugin, or theme directories
  • Shows:
    • File path
    • Line number
    • Syntax highlight

4. PHP Code Runner (Safe Sandbox)

  • Safely run custom PHP snippets for testing
  • Sandbox mode with optional WP nonce/role check
  • Ideal for hook testing, debugging

5. Template Locator

  • Shows template override paths for:
    • WooCommerce
    • Theme templates
  • Highlights whether template is being overridden and from where

6. WooCommerce Conditional Helper

  • Visual breakdown of:
    • is_product(), is_cart(), is_checkout(), etc.
  • Tells you which conditionals return true on the current page

7. Admin Area Tools

  • Find post meta
  • Inspect global $post, $product, $user, $order objects
  • Optionally dump info into admin bar or console

📦 Installation

Method 1: Manual Installation

  1. Download the plugin files
  2. Upload the devxpert folder to your /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Go to Tools → DevXpert to access the developer tools

Method 2: ZIP Upload

  1. Create a ZIP file of the plugin folder
  2. Go to Plugins → Add New → Upload Plugin
  3. Upload the ZIP file and activate
  4. Access via Tools → DevXpert

🛠️ Usage

Hook Inspector

  1. Go to Tools → DevXpert → Hook Inspector
  2. Enable "Hook Overlay"
  3. Visit any page on your site
  4. Hover over elements to see hook information
  5. Click hooks to copy names or view details

Function Tracer

  1. Go to Tools → DevXpert → Function Tracer
  2. Enter a function name (e.g., wp_head)
  3. Click "Search"
  4. View results showing file locations

PHP Runner

  1. Go to Tools → DevXpert → PHP Runner
  2. Enter PHP code in the textarea
  3. Click "Run Code"
  4. View output and return values

Template Locator

  1. Go to Tools → DevXpert → Template Locator
  2. Enter template name (e.g., single.php)
  3. Click "Search"
  4. See template locations and override status

WooCommerce Conditionals

  1. Go to Tools → DevXpert → WooCommerce Conditionals
  2. Click "Check Current Page Conditionals"
  3. View which conditionals return true

🎯 Keyboard Shortcuts

  • Ctrl/Cmd + Shift + H: Toggle hook overlay on frontend

🔧 Configuration

Settings

All plugin settings are managed through the admin interface at Tools → DevXpert. You can enable/disable individual features:

  • Hook Overlay
  • Hook Logger
  • Function Tracer
  • PHP Runner
  • Template Locator
  • WooCommerce Conditionals
  • Admin Tools

Security

  • Plugin only loads for administrators or when WP_DEBUG is true
  • PHP Runner includes security checks to prevent dangerous function execution
  • All AJAX requests include nonce verification

🏗️ Development

File Structure

devxpert/
├── devxpert.php                 # Main plugin file
├── includes/                    # PHP classes
│   └── Core/
│       ├── Plugin.php          # Main plugin class
│       ├── Admin/              # Admin interface
│       ├── HookInspector/      # Hook overlay functionality
│       ├── HookLogger/         # Hook logging
│       ├── FunctionTracer/     # Function location
│       ├── PhpRunner/          # Safe PHP execution
│       ├── TemplateLocator/    # Template finding
│       ├── WooConditionalHelper/ # WooCommerce conditionals
│       └── AdminTools/         # Admin debugging tools
├── assets/                      # Frontend assets
│   ├── css/
│   │   ├── admin.css          # Admin styles
│   │   └── frontend.css       # Frontend overlay styles
│   └── js/
│       ├── admin.js           # Admin functionality
│       └── frontend.js        # Frontend overlay functionality
├── templates/                   # PHP templates
│   └── admin-page.php         # Admin page template
└── languages/                  # Translation files

Hooks and Filters

The plugin provides several hooks for customization:

// Modify hook overlay behavior
add_filter('devxpert_hook_overlay_enabled', '__return_false');

// Add custom hook detection
add_action('devxpert_hook_detected', function($hook_name, $hook_data) {
    // Custom logic
}, 10, 2);

🐛 Troubleshooting

Hook Overlay Not Showing

  1. Ensure you're logged in as an administrator
  2. Check that "Hook Overlay" is enabled in settings
  3. Verify no JavaScript errors in browser console
  4. Check if theme conflicts with overlay positioning

PHP Runner Not Working

  1. Ensure you have administrator privileges
  2. Check that dangerous functions are not being used
  3. Verify nonce is valid
  4. Check server error logs

Function Tracer Not Finding Functions

  1. Ensure function name is correct
  2. Check file permissions on WordPress directories
  3. Verify search directories are accessible

📝 Changelog

Version 1.0.0

  • Initial release
  • Hook Inspector with visual overlay
  • Function Tracer
  • PHP Code Runner
  • Template Locator
  • WooCommerce Conditional Helper
  • Admin Tools

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

📄 License

This plugin is licensed under the GPL v2 or later.

🆘 Support

For support, feature requests, or bug reports:

  • Create an issue on GitHub
  • Check the troubleshooting section above
  • Review WordPress debugging guides

⚠️ Important Notes

  • This plugin is designed for development environments
  • Some features may impact performance on production sites
  • Always test thoroughly before using on live sites
  • Keep WordPress and plugins updated for security

🔮 Future Features

  • Hook performance profiling
  • Advanced code analysis
  • Database query inspector
  • Custom hook creation wizard
  • Integration with popular IDEs
  • Real-time collaboration tools

DevXpert - Making WordPress development easier, one hook at a time! 🚀 "# DevXpert"