Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/nftushar/devxpert/archive/refs/heads/main.zipA 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,$orderobjects - Optionally dump info into admin bar or console
📦 Installation
Method 1: Manual Installation
- Download the plugin files
- Upload the
devxpertfolder to your/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Tools → DevXpert to access the developer tools
Method 2: ZIP Upload
- Create a ZIP file of the plugin folder
- Go to Plugins → Add New → Upload Plugin
- Upload the ZIP file and activate
- Access via Tools → DevXpert
🛠️ Usage
Hook Inspector
- Go to Tools → DevXpert → Hook Inspector
- Enable "Hook Overlay"
- Visit any page on your site
- Hover over elements to see hook information
- Click hooks to copy names or view details
Function Tracer
- Go to Tools → DevXpert → Function Tracer
- Enter a function name (e.g.,
wp_head) - Click "Search"
- View results showing file locations
PHP Runner
- Go to Tools → DevXpert → PHP Runner
- Enter PHP code in the textarea
- Click "Run Code"
- View output and return values
Template Locator
- Go to Tools → DevXpert → Template Locator
- Enter template name (e.g.,
single.php) - Click "Search"
- See template locations and override status
WooCommerce Conditionals
- Go to Tools → DevXpert → WooCommerce Conditionals
- Click "Check Current Page Conditionals"
- 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_DEBUGis 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
- Ensure you're logged in as an administrator
- Check that "Hook Overlay" is enabled in settings
- Verify no JavaScript errors in browser console
- Check if theme conflicts with overlay positioning
PHP Runner Not Working
- Ensure you have administrator privileges
- Check that dangerous functions are not being used
- Verify nonce is valid
- Check server error logs
Function Tracer Not Finding Functions
- Ensure function name is correct
- Check file permissions on WordPress directories
- 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
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- 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"