Skip to content

lumumbapl/lumiblog-debug-log-inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Debug Log Inspector for WordPress

WordPress Plugin Version WordPress Compatibility PHP Version License

A powerful WordPress plugin for monitoring debug logs and tracking plugin errors in real-time. Monitor any WordPress plugin through an intuitive admin interface - no coding required!

banner-1544x500

πŸš€ Features

  • πŸ” Universal Plugin Monitoring - Monitor ANY WordPress plugin, not just specific ones
  • βš™οΈ No Code Required - Manage everything through a beautiful admin interface
  • 🎨 Visual Status Indicators - Color-coded admin bar (🟒 Green = OK, πŸ”΄ Red = Errors, βšͺ Gray = Disabled)
  • ⚑ Real-time Scanning - Automatically detects errors as they occur
  • 🎯 Smart Filtering - Only monitor active plugins (optional)
  • πŸ”„ Enable/Disable Toggle - Turn monitoring on/off without deleting entries
  • 🚫 Duplicate Prevention - Smart validation prevents adding the same plugin twice
  • πŸ“Š Last Error Display - Quick access to the most recent error
  • πŸ’¨ Lightweight - Minimal performance impact
  • πŸ—οΈ Clean Code - Modular, well-documented, follows WordPress standards

πŸ“Έ Screenshots

Settings Page

screenshot-1

Admin Bar Indicator

screenshot-2

Plugin List Management

screenshot-3

πŸ“‹ Requirements

  • WordPress 5.0 or higher
  • PHP 7.0 or higher
  • Debug logging enabled in WordPress

πŸ”§ Installation

Via WordPress Admin (Recommended)

  1. Download the latest release from the Releases page
  2. Go to Plugins > Add New > Upload Plugin
  3. Upload the zip file
  4. Click Install Now and then Activate

Manual Installation

cd wp-content/plugins
git clone https://github.com/yourusername/debug-log-inspector.git

Then activate through WordPress admin.

Enable Debug Logging

Add these lines to your wp-config.php file:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

🎯 Quick Start

  1. Navigate to Settings > Log Inspector
  2. Add a plugin to monitor:
    • Plugin Name: WooCommerce
    • Plugin File Path: woocommerce/woocommerce.php
    • Search Terms: woocommerce, wc-
  3. Save and check your admin bar for the status indicator

πŸ“– Usage Guide

Adding a Plugin to Monitor

  1. Go to Settings > Log Inspector
  2. Fill in the "Add New Plugin to Monitor" form:
    • Plugin Name: Display name (e.g., "WooCommerce")
    • Plugin File Path: Main plugin file (e.g., "woocommerce/woocommerce.php")
    • Search Terms: Keywords to look for in logs (e.g., "woocommerce, wc-")
  3. Click Add Plugin

Finding Plugin File Paths

The plugin file path format is: folder-name/main-file.php

Examples:

  • WooCommerce: woocommerce/woocommerce.php
  • Yoast SEO: wordpress-seo/wp-seo.php
  • Contact Form 7: contact-form-7/wp-contact-form-7.php

You can find this under Plugins > Installed Plugins (shown below each plugin name).

Understanding Search Terms

Search terms are keywords the plugin looks for in your debug.log file. Use unique identifiers from the plugin:

  • WooCommerce: woocommerce, wc-
  • Elementor: elementor, elementor-pro
  • Yoast SEO: yoast, wpseo

Pro Tip: Check your debug.log to see what keywords appear in error messages from the plugin.


πŸ§ͺ Testing the Plugin

Method 1: Test Plugin (Recommended)

Create wp-content/plugins/test-error/test-error.php:

<?php
/**
 * Plugin Name: Test Error Generator
 */
if ( isset( $_GET['trigger_test_error'] ) ) {
    trigger_error( 'Test error from WooCommerce', E_USER_WARNING );
}
  1. Activate the test plugin
  2. Visit: yoursite.com/wp-admin/?trigger_test_error=1
  3. Check admin bar - should turn RED
  4. Click "LOG INSPECTOR" to see the error

Method 2: Quick Test

Temporarily add this to any active plugin:

trigger_error( 'woocommerce test error', E_USER_WARNING );

Reload admin, check the admin bar, then remove the code.


πŸ—οΈ File Structure

debug-log-inspector/
β”œβ”€β”€ debug-log-inspector.php       # Main plugin file
β”œβ”€β”€ readme.txt                    # WordPress.org readme
β”œβ”€β”€ README.md                     # This file
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ class-log-inspector.php   # Core scanning logic
β”‚   β”œβ”€β”€ class-settings.php        # Settings page handler
β”‚   └── class-admin-bar.php       # Admin bar display
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── admin-style.css       # Admin interface styles
β”‚   └── js/
β”‚       └── admin-script.js       # Admin interface scripts
└── templates/
    └── settings-page.php          # Settings page template

🎨 Admin Bar Colors

Color Status Description
🟒 Green All Clear No errors detected in monitored plugins
πŸ”΄ Red Errors Found At least one plugin has errors
βšͺ Gray Disabled Debug logging is not enabled

βš™οΈ Settings

General Settings

  • Log Scan Size: Maximum bytes to scan (default: 300KB)
  • Auto Enable: Only monitor active plugins
  • Show Last Error: Display most recent error in admin bar

πŸ› οΈ Development

Setting Up Development Environment

# Clone the repository
git clone https://github.com/yourusername/debug-log-inspector.git

# Navigate to the plugin directory
cd debug-log-inspector

# Create a symlink in your WordPress plugins directory
ln -s $(pwd) /path/to/wordpress/wp-content/plugins/debug-log-inspector

Coding Standards

This plugin follows WordPress Coding Standards.

Run PHP CodeSniffer:

phpcs --standard=WordPress debug-log-inspector/

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Changelog

Version 2.0.0 (Current)

πŸŽ‰ Major Rewrite

  • ✨ Complete plugin rewrite with modular architecture
  • ✨ Universal plugin monitoring - works with ANY WordPress plugin
  • ✨ Settings page for easy management (no code editing)
  • ✨ Add/Edit/Delete plugins through admin interface
  • ✨ Enable/Disable toggle for individual plugins
  • ✨ Duplicate prevention using file paths and names
  • ✨ Improved security with proper nonce verification
  • ✨ Better internationalization support
  • ✨ Full WordPress Coding Standards compliance
  • πŸ› Fixed multiple security warnings
  • 🎨 Modern admin UI with better UX

Version 1.0.0

  • πŸŽ‰ Initial release
  • ⚑ Basic monitoring for predefined plugins
  • 🎨 Color-coded admin bar indicator
  • πŸ“Š Last error message display

View Full Changelog


πŸ› Known Issues

  • None currently reported

Report a Bug


πŸ—ΊοΈ Roadmap

Planned Features

  • Email notifications when errors detected
  • Export error logs to CSV
  • Error statistics dashboard
  • Multi-site network admin support
  • Integration with error tracking services (Sentry, Rollbar)
  • Custom alert thresholds
  • Error categorization (warnings vs fatal)
  • Automated testing suite
  • WP-CLI commands

View Full Roadmap


❓ FAQ

How do I enable debug logging?

Add to your wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

Will this slow down my site?

No. The plugin only runs in the WordPress admin area and uses efficient file reading.

Can I monitor custom plugins?

Yes! As long as the plugin writes to the debug log, you can monitor it.

Does it work with Multisite?

Yes, the plugin works on WordPress Multisite installations.

More FAQs


πŸ”’ Security

Debug Log Inspector takes security seriously. We follow WordPress security best practices:

  • βœ… Proper nonce verification
  • βœ… Data sanitization and validation
  • βœ… Capability checks
  • βœ… Escaping output
  • βœ… No external API calls
  • βœ… Local file reading only

Found a security issue? Please report it privately to [email protected]


πŸ“„ License

This plugin is licensed under the GPL v2 or later.

Copyright (C) 2025 Paluhost Web Services

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

Full License Text


πŸ‘₯ Credits

Developed By

Paluhost Web Services

Contributors

Thanks to these wonderful people who have contributed to this project:

Want to contribute? See CONTRIBUTING.md


πŸ’¬ Support

Documentation

Get Help

Community


🌟 Show Your Support

If you find this plugin helpful, please:

  • ⭐ Star this repository
  • πŸ› Report bugs and issues
  • πŸ’‘ Suggest new features
  • πŸ”€ Submit pull requests
  • πŸ“’ Share with the WordPress community
  • β˜• Buy us a coffee

πŸ“Š Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub last commit


Made with ❀️ by Paluhost Web Services

⬆ Back to Top

About

Monitor debug logs for any WordPress plugin errors and display real-time status in the admin bar

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published