Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/suggest-plugin-s-option-prefix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Suggest plugin's option prefix
about: AAA Option Optimizer lists the plugin to which an option belongs, if it recognizes
about: AAA Autoload Optimizer lists the plugin to which an option belongs, if it recognizes
it.
title: "[Plugin Identification] Suggest plugin's option prefix"
labels: enhancement
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

![GitHub banner](/.wordpress-org/github_banner_aaaoo_pp.png)

# AAA Option Optimizer
# AAA Autoload Optimizer
This plugin tracks which of the autoloaded options are used on a page, and stores that data at the end of page render. It keeps an array of options that it has seen as being used. On the admin page, it compares all the autoloaded options to the array of stored options, and shows the autoloaded options that have not been used as you were browsing the site. If you've been to every page on your site, or you've kept the plugin around for a week or so, this means that those options probably don't need to be autoloaded.

## How to use this plugin
Expand Down
4 changes: 2 additions & 2 deletions aaa-option-optimizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
*
* @package Progress_Planner\OptionOptimizer
*
* Plugin Name: Autoload Optimizer
* Plugin Name: AAA Autoload Optimizer
* Plugin URI: https://progressplanner.com/plugins/aaa-option-optimizer/
* Description: Tracks autoloaded options usage and allows the user to optimize them.
* Version: 1.6.1
* Version: 1.7.0
* License: GPL-3.0+
* Author: Team Progress Planner
* Author URI: https://progressplanner.com/
Expand Down
2 changes: 1 addition & 1 deletion known-plugins/known-plugins.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"aaa-option-optimizer": {
"name": "AAA Option Optimizer",
"name": "AAA Autoload Optimizer",
"option_prefixes": ["option_optimizer"]
},
"accessibility-checker": {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aaa-option-optimizer",
"version": "1.3.2",
"version": "1.7.0",
"private": true,
"description": "WordPress plugin",
"author": "Team Emilia Projects",
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="AAA Option Optimizer project" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="AAA Autoload Optimizer project" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">

<description>A custom set of rules to check for the AAA Option Optimizer project</description>
<description>A custom set of rules to check for the AAA Autoload Optimizer project</description>

<!--
#############################################################################
Expand Down
25 changes: 18 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Autoload Optimizer ===
=== AAA Autoload Optimizer ===
Contributors: joostdevalk, aristath, filipi, progressplanner
Tags: autoload, options, database, performance, cleanup
Requires at least: 6.4
Tested up to: 7.0
Stable tag: 1.6.1
Requires at least: 6.7
Tested up to: 7.1
Stable tag: 1.7.0
Requires PHP: 7.4
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Expand All @@ -18,7 +18,7 @@ those options belong to plugins you removed long ago, or simply don't need
to be autoloaded. The result: a bigger database query, slower page loads,
and wasted server resources.

**Autoload Optimizer** tracks which autoloaded options your site actually
**AAA Autoload Optimizer** tracks which autoloaded options your site actually
uses, then shows you the ones it doesn't — so you can safely remove them
or turn off autoloading.

Expand Down Expand Up @@ -74,11 +74,11 @@ accurate measurement.
= Automatic installation =

1. In your WordPress dashboard, go to **Plugins → Add New**.
2. Search for **Autoload Optimizer**.
2. Search for **AAA Autoload Optimizer**.
3. Click **Install Now**, then **Activate**.
4. Browse your site normally for a few days — or visit every page
manually if you're in a hurry.
5. Go to **Tools → Option Optimizer** to review and optimize your
5. Go to **Tools → Autoload Optimizer** to review and optimize your
autoloaded options.

= Manual installation =
Expand Down Expand Up @@ -158,6 +158,13 @@ Submit a pull request on GitHub to

== Changelog ==

= 1.7.0 =

* Rename the plugin to AAA Autoload Optimizer.
* Fix database deadlocks when concurrent requests write tracked options.
* Fix a fatal error when W3 Total Cache's database cache is active.
* Readme improvements.

= 1.6.1 =

* Fix infinite recursion in option access monitoring that could cause a
Expand Down Expand Up @@ -273,6 +280,10 @@ Initial release on GitHub and WordPress.org.

== Upgrade Notice ==

= 1.7.0 =
The plugin is now called AAA Autoload Optimizer. Also fixes bugs with
concurrent requests and W3 Total Cache.

= 1.6.1 =
Fixes a potential fatal error from infinite recursion in option
monitoring on certain hosts.
Expand Down
16 changes: 8 additions & 8 deletions src/class-admin-page.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* Admin page functionality for AAA Option Optimizer.
* Admin page functionality for AAA Autoload Optimizer.
*
* @package Progress_Planner\OptionOptimizer
*/

namespace Progress_Planner\OptionOptimizer;

/**
* Admin page functionality for AAA Option Optimizer.
* Admin page functionality for AAA Autoload Optimizer.
*/
class Admin_Page {

Expand Down Expand Up @@ -135,8 +135,8 @@ public function filter_plugin_actions( $links, $file ): array {
*/
public function add_admin_page() {
\add_management_page(
__( 'AAA Option Optimizer', 'aaa-option-optimizer' ),
__( 'Option Optimizer', 'aaa-option-optimizer' ),
__( 'AAA Autoload Optimizer', 'aaa-option-optimizer' ),
__( 'Autoload Optimizer', 'aaa-option-optimizer' ),
'manage_options',
'aaa-option-optimizer',
[ $this, 'render_admin_page_ajax' ]
Expand Down Expand Up @@ -271,7 +271,7 @@ public function render_admin_page_ajax() {
$migration_status = Database::get_migration_status();
?>
<div class="wrap">
<h1><?php \esc_html_e( 'AAA Option Optimizer', 'aaa-option-optimizer' ); ?></h1>
<h1><?php \esc_html_e( 'AAA Autoload Optimizer', 'aaa-option-optimizer' ); ?></h1>

<?php if ( $migration_status['needs_migration'] ) : ?>
<div id="aaa-migration-notice" class="notice notice-warning">
Expand Down Expand Up @@ -306,7 +306,7 @@ public function render_admin_page_ajax() {
<label class="label" for="tab-1"><?php \esc_html_e( 'Unused, but autoloaded', 'aaa-option-optimizer' ); ?></label>
<div class="panel">
<h2 id="unused-autoloaded"><?php \esc_html_e( 'Unused, but autoloaded', 'aaa-option-optimizer' ); ?></h2>
<p><?php \esc_html_e( 'The following options are autoloaded on each pageload, but AAA Option Optimizer has not been able to detect them being used.', 'aaa-option-optimizer' ); ?></p>
<p><?php \esc_html_e( 'The following options are autoloaded on each pageload, but AAA Autoload Optimizer has not been able to detect them being used.', 'aaa-option-optimizer' ); ?></p>

<table style="width:100%" id="unused_options_table" class="aaa_option_table">
<thead>
Expand Down Expand Up @@ -347,7 +347,7 @@ public function render_admin_page_ajax() {
<div class="panel">
<?php // Render differences. ?>
<h2 id="used-not-autoloaded"><?php \esc_html_e( 'Used, but not autoloaded options', 'aaa-option-optimizer' ); ?></h2>
<p><?php \esc_html_e( 'The following options are *not* autoloaded on each pageload, but AAA Option Optimizer has detected that they are being used. If one of the options below has been called a lot and is not very big, you might consider adding autoload to that option.', 'aaa-option-optimizer' ); ?></p>
<p><?php \esc_html_e( 'The following options are *not* autoloaded on each pageload, but AAA Autoload Optimizer has detected that they are being used. If one of the options below has been called a lot and is not very big, you might consider adding autoload to that option.', 'aaa-option-optimizer' ); ?></p>
<table style="width:100%;" id="used_not_autoloaded_table" class="aaa_option_table">
<thead>
<tr>
Expand Down Expand Up @@ -389,7 +389,7 @@ public function render_admin_page_ajax() {
<label class="label" for="tab-3"><?php \esc_html_e( 'Requested options that do not exist', 'aaa-option-optimizer' ); ?></label>
<div class="panel">
<h2 id="requested-do-not-exist"><?php \esc_html_e( 'Requested options that do not exist', 'aaa-option-optimizer' ); ?></h2>
<p><?php \esc_html_e( 'The following options are requested sometimes, but AAA Option Optimizer has detected that they do not exist. If one of the options below has been called a lot, it might help to create it with a value of false.', 'aaa-option-optimizer' ); ?></p>
<p><?php \esc_html_e( 'The following options are requested sometimes, but AAA Autoload Optimizer has detected that they do not exist. If one of the options below has been called a lot, it might help to create it with a value of false.', 'aaa-option-optimizer' ); ?></p>
<table width="100%" id="requested_do_not_exist_table" class="aaa_option_table">
<thead>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion src/class-database.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Database functionality for AAA Option Optimizer.
* Database functionality for AAA Autoload Optimizer.
*
* @package Progress_Planner\OptionOptimizer
*/
Expand Down
4 changes: 2 additions & 2 deletions src/class-plugin.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* Plugin functionality for AAA Option Optimizer.
* Plugin functionality for AAA Autoload Optimizer.
*
* @package Progress_Planner\OptionOptimizer
*/

namespace Progress_Planner\OptionOptimizer;

/**
* Core functionality of AAA Option Optimizer.
* Core functionality of AAA Autoload Optimizer.
*/
class Plugin {
/**
Expand Down
4 changes: 2 additions & 2 deletions src/class-rest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* REST functionality for AAA Option Optimizer.
* REST functionality for AAA Autoload Optimizer.
*
* @package Progress_Planner\OptionOptimizer
*/
Expand All @@ -12,7 +12,7 @@
use WP_REST_Response;

/**
* REST functionality of AAA Option Optimizer.
* REST functionality of AAA Autoload Optimizer.
*/
class REST {

Expand Down
Loading