Update wiki documentation to accurately reflect plugin functionality

This commit is contained in:
2025-04-17 04:20:51 +01:00
parent 9afa732c20
commit 81ca661b75
6 changed files with 87 additions and 132 deletions

View File

@ -42,20 +42,18 @@ Yes, this plugin is compatible with all major caching plugins. Since it only ope
### How often should I run the plugin?
We recommend running the plugin:
The plugin runs automatically whenever you visit the WordPress plugins page. You don't need to manually run it. We recommend checking your plugins page:
- After manually deleting any plugins
- When you see "Plugin file does not exist" notices in your admin dashboard
- As part of your regular WordPress maintenance routine (monthly or quarterly)
You can also configure the plugin to run automatic scans on a schedule of your choosing.
### Can I automate the cleanup process?
Yes, you can configure the plugin to automatically clean up orphaned plugin references by enabling the "Automatic Cleanup" option in the plugin settings. You can also use the WP-CLI commands to include the cleanup process in your automated maintenance scripts.
The plugin doesn't include automatic cleanup functionality. It's designed to give you control over which orphaned references to remove. This is intentional, as automatically removing plugin references could potentially cause issues if the references are still needed by other plugins or themes.
### Does the plugin create logs of its actions?
Yes, the plugin maintains logs of all scanning and cleanup actions. You can view these logs in the plugin's dashboard or download them for reference. This is particularly useful for troubleshooting or for maintaining an audit trail of changes to your WordPress installation.
No, the plugin doesn't create logs of its actions. It provides immediate feedback through WordPress admin notices when you remove a plugin reference, but it doesn't maintain a persistent log of these actions.
### Can I undo the changes made by the plugin?

View File

@ -19,18 +19,18 @@ The "Fix 'Plugin file does not exist' Notices" plugin addresses a common issue i
This plugin provides a simple, effective solution by:
1. Automatically detecting and removing these orphaned plugin references
2. Cleaning up the WordPress database to prevent the notices from appearing
3. Providing a user-friendly interface to manage the cleanup process
1. Automatically detecting orphaned plugin references in the WordPress database
2. Adding these missing plugins to your plugins list with a "Remove Notice" action link
3. Allowing you to safely clean up invalid plugin references directly from the plugins page
## Key Features
- **Automatic Detection**: Identifies orphaned plugin references in the WordPress database
- **One-Click Cleanup**: Removes the orphaned references with a single click
- **Bulk Cleanup**: Handles multiple orphaned references at once
- **Preventive Measures**: Helps prevent future occurrences of the issue
- **Detailed Logging**: Keeps track of all cleanup actions for reference
- **User-Friendly Interface**: Simple, intuitive controls for all users
- **One-Click Cleanup**: Removes the orphaned references with a single click via the "Remove Notice" action link
- **Seamless Integration**: Works directly within the WordPress plugins page
- **No Settings Page**: Zero configuration required - just install and it works
- **Multisite Compatible**: Works with both single-site and multisite WordPress installations
- **Update Source Selection**: Choose between WordPress.org, GitHub, or Gitea for plugin updates
## Getting Started

View File

@ -14,8 +14,8 @@ The "Fix 'Plugin file does not exist' Notices" plugin addresses this issue by:
1. Scanning the WordPress database for references to plugins
2. Checking if the referenced plugin files actually exist
3. Providing a user-friendly interface to remove references to non-existent plugins
4. Automatically cleaning up the database to prevent the notices from appearing
3. Adding missing plugins to the plugins list with a "Remove Notice" action link
4. Allowing you to safely clean up invalid plugin references directly from the plugins page
## Technical Implementation
@ -67,33 +67,36 @@ To ensure safety and prevent data corruption, the plugin:
The plugin integrates with WordPress in the following ways:
### Admin Interface
### Admin Integration
- Adds a menu item under **Tools > Fix Plugin Notices**
- Provides a user-friendly interface for scanning and cleaning up orphaned references
- Displays detailed information about detected issues
- Offers bulk actions for efficient cleanup
- Integrates directly with the WordPress plugins page
- Adds missing plugins to the plugins list with "(File Missing)" indicator
- Provides a "Remove Notice" action link for each orphaned plugin reference
- Displays success/error messages after cleanup operations
- Adds an "Update Source" link to select your preferred update source
### Hooks and Filters
### Modal Interface
- Uses WordPress action hooks to integrate with the admin interface
- Provides custom hooks and filters for developers to extend or modify functionality
- Integrates with WordPress cron for scheduled scans
- Provides a modal dialog for selecting the update source
- Offers three options: WordPress.org, GitHub, and Gitea
- Saves the selected update source preference
- Ensures the plugin checks for updates from the selected source
### WP-CLI Integration
### Git Updater Integration
- Provides WP-CLI commands for scanning and cleaning up orphaned references
- Supports batch processing for large installations
- Offers verbose output for debugging and logging
- Integrates with the Git Updater plugin for updates from GitHub and Gitea
- Provides proper plugin headers for Git Updater compatibility
- Ensures correct version display in plugin details popup
## Performance Considerations
The plugin is designed with performance in mind:
- Scans are performed efficiently to minimize database queries
- Resource-intensive operations are batched to prevent timeouts
- Automatic scans are scheduled during low-traffic periods
- Caching is used where appropriate to improve performance
- Only runs on the plugins page where it's needed
- Performs scans efficiently to minimize database queries
- Uses WordPress core functions for database operations
- Implements proper caching for plugin information
- Has minimal impact on admin page load times
## Security Considerations

View File

@ -52,9 +52,10 @@ If you prefer to install the plugin via Git, you can clone the repository direct
After installing and activating the plugin, you should:
1. Navigate to **Tools > Fix Plugin Notices** in your WordPress admin dashboard.
1. Navigate to **Plugins** in your WordPress admin dashboard.
2. The plugin will automatically scan for orphaned plugin references.
3. Follow the on-screen instructions to clean up any detected issues.
3. Any detected orphaned references will appear in your plugins list with "(File Missing)" next to their name.
4. Click the **Remove Notice** link under each orphaned plugin to clean it up.
## Troubleshooting Installation Issues

View File

@ -27,31 +27,27 @@ This page provides solutions to common issues you might encounter when using the
- Clear your browser cache and any server-side caches.
- Disable caching plugins temporarily to see if that resolves the issue.
### Plugin Scan Fails or Times Out
### Plugin Doesn't Detect Orphaned References on the Plugins Page
**Issue**: The plugin scan fails to complete or times out.
**Issue**: The plugin doesn't detect any orphaned references when you visit the plugins page.
**Possible Causes and Solutions**:
1. **Server Resource Limitations**:
- Your server might have resource limitations (memory, execution time) that prevent the scan from completing.
- Try increasing the PHP memory limit and execution time in your `wp-config.php` file:
```php
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
set_time_limit(300); // 5 minutes
```
1. **Browser Caching**:
- Your browser might be caching the plugins page.
- Try clearing your browser cache or using a private/incognito window.
2. **Large Database**:
- If you have a large database, the scan might take longer to complete.
- Try using the WP-CLI command instead, which is more efficient for large databases:
```
wp fix-plugin-notices scan
```
2. **Plugin Conflicts**:
- Another plugin might be interfering with the plugins page.
- Try temporarily deactivating other plugins to see if that resolves the issue.
3. **Server Configuration**:
- Some server configurations might block long-running processes.
- Contact your hosting provider to check if there are any restrictions on script execution time.
3. **Theme Customizations**:
- Custom theme modifications might affect how the plugins page is displayed.
- Try switching to a default WordPress theme temporarily to see if that resolves the issue.
4. **Server Configuration**:
- Some server configurations might affect how the plugin operates.
- Check your server's PHP version and ensure it meets the minimum requirements (PHP 7.0 or higher).
### Cleanup Doesn't Remove Notices
@ -101,18 +97,20 @@ This page provides solutions to common issues you might encounter when using the
## Advanced Troubleshooting
### Debugging Mode
### WordPress Debugging
You can enable debugging mode to get more detailed information about the plugin's operations:
You can enable WordPress debugging to get more information about what's happening:
1. Add the following code to your `wp-config.php` file:
```php
define('WPFPDEN_DEBUG', true);
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
```
2. Run the plugin scan and cleanup processes.
2. Visit the plugins page and perform any cleanup actions.
3. Check the debug log file in the plugin's `logs` directory for detailed information.
3. Check the debug.log file in your wp-content directory for any relevant information.
### Manual Database Inspection

View File

@ -2,101 +2,56 @@
This page provides detailed instructions on how to use the "Fix 'Plugin file does not exist' Notices" plugin to clean up orphaned plugin references in your WordPress installation.
## Accessing the Plugin
## How the Plugin Works
After installing and activating the plugin, you can access it by navigating to **Tools > Fix Plugin Notices** in your WordPress admin dashboard.
The plugin works automatically in the background without requiring any configuration:
## Plugin Interface
The plugin interface consists of the following sections:
### Dashboard
The dashboard provides an overview of:
- Number of orphaned plugin references detected
- Last scan date and time
- Quick action buttons for common tasks
### Scan Results
This section displays a list of all detected orphaned plugin references, including:
- Plugin name (if available)
- Plugin file path
- Status (active/inactive)
- Action buttons for each entry
### Settings
The settings section allows you to configure:
- Automatic scanning frequency
- Notification preferences
- Logging options
- Advanced cleanup options
1. It detects orphaned plugin references in your WordPress database
2. It adds these missing plugins to your plugins list with a "Remove Notice" action link
3. It allows you to safely clean up invalid plugin references directly from the plugins page
## Basic Usage
### Scanning for Orphaned Plugin References
### Viewing Orphaned Plugin References
1. Navigate to **Tools > Fix Plugin Notices**.
2. Click the **Scan Now** button.
3. The plugin will scan your WordPress database for orphaned plugin references.
4. Once the scan is complete, the results will be displayed in the Scan Results section.
1. After installing and activating the plugin, navigate to **Plugins** in your WordPress admin dashboard.
2. The plugin automatically scans for orphaned plugin references.
3. Any detected orphaned references will appear in your plugins list with "(File Missing)" next to their name.
4. Each orphaned plugin will have a description explaining that it's still marked as active in your database but its files can't be found.
### Cleaning Up Orphaned References
#### Individual Cleanup
1. In the Scan Results section, locate the orphaned plugin reference you want to clean up.
2. Click the **Fix** button next to the entry.
1. In the plugins list, locate the orphaned plugin reference you want to clean up (marked with "File Missing").
2. Click the **Remove Notice** link under the plugin name.
3. The plugin will remove the orphaned reference from your WordPress database.
4. A success message will be displayed once the cleanup is complete.
5. The plugin reference will no longer appear in your plugins list, and the error notice will be eliminated.
#### Bulk Cleanup
## Update Source Selection
1. In the Scan Results section, check the boxes next to the orphaned plugin references you want to clean up.
2. Select "Fix Selected" from the Bulk Actions dropdown.
3. Click the **Apply** button.
4. The plugin will remove all selected orphaned references from your WordPress database.
5. A success message will be displayed once the cleanup is complete.
The plugin allows you to choose your preferred update source:
#### Automatic Cleanup
1. In the plugins list, find the "Fix 'Plugin file does not exist' Notices" plugin.
2. Click the **Update Source** link under the plugin name.
3. A modal dialog will appear with three options:
- **WordPress.org**: Get updates from the official WordPress plugin repository
- **GitHub**: Get updates from the GitHub repository
- **Gitea**: Get updates from the Gitea repository
4. Select your preferred update source and click **Save**.
5. The plugin will now check for updates from your selected source.
You can configure the plugin to automatically clean up orphaned plugin references:
## No Settings Page
1. Navigate to the Settings section.
2. Enable the "Automatic Cleanup" option.
3. Configure the frequency and conditions for automatic cleanup.
4. Click **Save Changes**.
This plugin intentionally has no settings page or admin menu. It works automatically in the background and provides all functionality directly on the plugins page where it's needed most.
## Advanced Usage
## Multisite Compatibility
### Command Line Interface
The plugin is fully compatible with WordPress multisite installations:
The plugin provides a WP-CLI command for scanning and cleaning up orphaned plugin references:
```
wp fix-plugin-notices scan
wp fix-plugin-notices cleanup
wp fix-plugin-notices cleanup --all
```
For more information on using the command line interface, see the [Command Line Interface](Command-Line-Interface) documentation.
### Hooks and Filters
The plugin provides several hooks and filters that allow you to customize its behavior:
```php
// Example: Customize the scan frequency
add_filter('wpfpden_scan_frequency', function($frequency) {
return 'daily'; // Options: hourly, daily, weekly
});
```
For more information on available hooks and filters, see the [Hooks and Filters](Hooks-and-Filters) documentation.
- In a network admin context, it detects and fixes orphaned network-activated plugin references
- In a site admin context, it detects and fixes orphaned site-activated plugin references
## Best Practices