diff --git a/aaa-option-optimizer.php b/aaa-option-optimizer.php
index cf090b9..212fcd1 100644
--- a/aaa-option-optimizer.php
+++ b/aaa-option-optimizer.php
@@ -1,54 +1,43 @@
get_row(
- $wpdb->prepare( "SELECT count(*) AS count, SUM( LENGTH( option_value ) ) as autoload_size FROM {$wpdb->options} WHERE autoload IN ( $placeholders )", $autoload_values )
- );
- // phpcs:enable WordPress.DB
+function aaa_meta_optimizer_activation() {
update_option(
- 'option_optimizer',
+ 'meta_optimizer',
[
- 'starting_point_kb' => ( $result->autoload_size / 1024 ),
- 'starting_point_num' => $result->count,
'starting_point_date' => current_time( 'mysql' ),
- 'used_options' => [],
+ 'used_meta_fields' => [],
],
true
);
@@ -59,9 +48,9 @@ function aaa_option_optimizer_activation() {
*
* @return void
*/
-function aaa_option_optimizer_deactivation() {
- $aaa_option_value = get_option( 'option_optimizer' );
- update_option( 'option_optimizer', $aaa_option_value, false );
+function aaa_meta_optimizer_deactivation() {
+ $aaa_option_value = get_option( 'meta_optimizer' );
+ update_option( 'meta_optimizer', $aaa_option_value, false );
}
/**
@@ -69,9 +58,9 @@ function aaa_option_optimizer_deactivation() {
*
* @return void
*/
-function aaa_option_optimizer_init() {
- $optimizer = new Emilia\OptionOptimizer\Plugin();
+function aaa_meta_optimizer_init() {
+ $optimizer = new Emilia\MetaOptimizer\Plugin();
$optimizer->register_hooks();
}
-aaa_option_optimizer_init();
+aaa_meta_optimizer_init();
diff --git a/composer.json b/composer.json
index 68a8d8f..77d1480 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
- "name": "emilia/aaa-option-optimizer",
- "description": "Plugin that tracks autoloaded options usage and allows the user to optimize them.",
+ "name": "emilia/aaa-meta-optimizer",
+ "description": "Plugin that tracks post meta usage and allows the user to optimize them.",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"authors": [
diff --git a/composer.lock b/composer.lock
index caaaa3c..1719f90 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fd7786df413fbfa0ec1e1564845fe06c",
+ "content-hash": "2d53a78063241227f4ef57a4e0cf8e15",
"packages": [],
"packages-dev": [
{
@@ -148,16 +148,16 @@
},
{
"name": "php-stubs/wordpress-stubs",
- "version": "v6.6.0",
+ "version": "v6.7.2",
"source": {
"type": "git",
"url": "https://github.com/php-stubs/wordpress-stubs.git",
- "reference": "86e8753e89d59849276dcdd91b9a7dd78bb4abe2"
+ "reference": "c04f96cb232fab12a3cbcccf5a47767f0665c3f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/86e8753e89d59849276dcdd91b9a7dd78bb4abe2",
- "reference": "86e8753e89d59849276dcdd91b9a7dd78bb4abe2",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/c04f96cb232fab12a3cbcccf5a47767f0665c3f4",
+ "reference": "c04f96cb232fab12a3cbcccf5a47767f0665c3f4",
"shasum": ""
},
"require-dev": {
@@ -166,9 +166,9 @@
"php": "^7.4 || ^8.0",
"php-stubs/generator": "^0.8.3",
"phpdocumentor/reflection-docblock": "^5.4.1",
- "phpstan/phpstan": "^1.10.49",
+ "phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^9.5",
- "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0",
+ "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1",
"wp-coding-standards/wpcs": "3.1.0 as 2.3.0"
},
"suggest": {
@@ -190,9 +190,9 @@
],
"support": {
"issues": "https://github.com/php-stubs/wordpress-stubs/issues",
- "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.0"
+ "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.7.2"
},
- "time": "2024-07-17T08:50:38+00:00"
+ "time": "2025-02-12T04:51:58+00:00"
},
{
"name": "phpcompatibility/php-compatibility",
@@ -200,12 +200,12 @@
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
- "reference": "d9ae4b030f174c8f01d400244107e28ad65ec5e1"
+ "reference": "9013cd039fe5740953f9fdeebd19d901b80e26f2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/d9ae4b030f174c8f01d400244107e28ad65ec5e1",
- "reference": "d9ae4b030f174c8f01d400244107e28ad65ec5e1",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9013cd039fe5740953f9fdeebd19d901b80e26f2",
+ "reference": "9013cd039fe5740953f9fdeebd19d901b80e26f2",
"shasum": ""
},
"require": {
@@ -218,7 +218,7 @@
},
"require-dev": {
"php-parallel-lint/php-console-highlighter": "^1.0.0",
- "php-parallel-lint/php-parallel-lint": "^1.3.2",
+ "php-parallel-lint/php-parallel-lint": "^1.4.0",
"phpcsstandards/phpcsdevcs": "^1.1.3",
"phpcsstandards/phpcsdevtools": "^1.2.0",
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4 || ^10.1.0",
@@ -280,34 +280,38 @@
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/phpcompatibility",
+ "type": "thanks_dev"
}
],
- "time": "2024-08-31T21:55:43+00:00"
+ "time": "2025-01-20T20:06:48+00:00"
},
{
"name": "phpcompatibility/phpcompatibility-paragonie",
- "version": "1.3.2",
+ "version": "1.3.3",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
- "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26"
+ "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
- "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac",
+ "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac",
"shasum": ""
},
"require": {
"phpcompatibility/php-compatibility": "^9.0"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
+ "dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"paragonie/random_compat": "dev-master",
"paragonie/sodium_compat": "dev-master"
},
"suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
+ "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
},
"type": "phpcodesniffer-standard",
@@ -337,22 +341,37 @@
],
"support": {
"issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
+ "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy",
"source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
},
- "time": "2022-10-25T01:46:02+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/PHPCompatibility",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/jrfnl",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/php_codesniffer",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2024-04-24T21:30:46+00:00"
},
{
"name": "phpcompatibility/phpcompatibility-wp",
- "version": "2.1.5",
+ "version": "2.1.6",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
- "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082"
+ "reference": "80ccb1a7640995edf1b87a4409fa584cd5869469"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/01c1ff2704a58e46f0cb1ca9d06aee07b3589082",
- "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/80ccb1a7640995edf1b87a4409fa584cd5869469",
+ "reference": "80ccb1a7640995edf1b87a4409fa584cd5869469",
"shasum": ""
},
"require": {
@@ -409,7 +428,7 @@
"type": "open_collective"
}
],
- "time": "2024-04-24T21:37:59+00:00"
+ "time": "2025-01-16T22:34:19+00:00"
},
{
"name": "phpcsstandards/phpcsextra",
@@ -627,16 +646,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.12.2",
+ "version": "1.12.23",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1"
+ "reference": "29201e7a743a6ab36f91394eab51889a82631428"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0ca1c7bb55fca8fe6448f16fff0f311ccec960a1",
- "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/29201e7a743a6ab36f91394eab51889a82631428",
+ "reference": "29201e7a743a6ab36f91394eab51889a82631428",
"shasum": ""
},
"require": {
@@ -681,20 +700,20 @@
"type": "github"
}
],
- "time": "2024-09-05T16:09:28+00:00"
+ "time": "2025-03-23T14:57:32+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.10.2",
+ "version": "3.12.0",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017"
+ "reference": "2d1b63db139c3c6ea0c927698e5160f8b3b8d630"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017",
- "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/2d1b63db139c3c6ea0c927698e5160f8b3b8d630",
+ "reference": "2d1b63db139c3c6ea0c927698e5160f8b3b8d630",
"shasum": ""
},
"require": {
@@ -759,32 +778,36 @@
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/phpcsstandards",
+ "type": "thanks_dev"
}
],
- "time": "2024-07-21T23:26:44+00:00"
+ "time": "2025-03-18T05:04:51+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.29.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "21bd091060673a1177ae842c0ef8fe30893114d2"
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2",
- "reference": "21bd091060673a1177ae842c0ef8fe30893114d2",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"type": "library",
"extra": {
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -821,7 +844,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0"
},
"funding": [
{
@@ -837,7 +860,7 @@
"type": "tidelift"
}
],
- "time": "2024-01-29T20:11:03+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "szepeviktor/phpstan-wordpress",
diff --git a/js/admin-script.js b/js/admin-script.js
index acfc640..381357f 100644
--- a/js/admin-script.js
+++ b/js/admin-script.js
@@ -1,7 +1,7 @@
/**
* JavaScript for the admin page.
*
- * @package Emilia\OptionOptimizer
+ * @package Emilia\MetaOptimizer
*/
/**
@@ -17,7 +17,6 @@ jQuery( document ).ready(
const tablesToInitialize = [
'#unused_options_table',
'#used_not_autoloaded_table',
- '#requested_do_not_exist_table',
];
$( '#all_options_table' ).hide();
@@ -49,15 +48,15 @@ jQuery( document ).ready(
if (selector === '#all_options_table') {
options.ajax = {
- url: aaaOptionOptimizer.root + 'aaa-option-optimizer/v1/all-options',
- headers: { 'X-WP-Nonce': aaaOptionOptimizer.nonce },
+ url: aaaMetaOptimizer.root + 'aaa-option-optimizer/v1/all-options',
+ headers: { 'X-WP-Nonce': aaaMetaOptimizer.nonce },
type: 'GET',
dataSrc: 'data'
};
options.rowId = 'row_id';
}
- options.language = aaaOptionOptimizer.i18n;
+ options.language = aaaMetaOptimizer.i18n;
const dataTable = new DataTable( selector, options ).columns.adjust().responsive.recalc();;
}
@@ -73,8 +72,6 @@ jQuery( document ).ready(
const commonColumns = [
{ name: 'name' },
{ name: 'source' },
- { name: 'size', searchable: false },
- { name: 'autoload', className: 'autoload', searchable: false },
{ name: 'actions', searchable: false, orderable: false }
];
@@ -89,8 +86,6 @@ jQuery( document ).ready(
return [
{ name: 'name' },
{ name: 'source' },
- { name: 'size', searchable: false },
- { name: 'autoload', className: 'autoload', searchable: false },
{ name: 'calls', searchable: false },
{ name: 'actions', searchable: false, orderable: false }
]
@@ -125,7 +120,7 @@ jQuery( document ).ready(
function setupColumnFilters() {
const column = this;
const select = document.createElement( 'select' );
- select.add( new Option( aaaOptionOptimizer.i18n.filterBySource, '', true, true ) );
+ select.add( new Option( aaaMetaOptimizer.i18n.filterBySource, '', true, true ) );
column.footer().replaceChildren( select );
select.addEventListener(
@@ -157,26 +152,26 @@ jQuery( document ).ready(
'';
const actions = [
- '',
+ '',
popoverContent,
row.autoload === 'no' ?
- '' :
- '',
- ''
+ '' :
+ '',
+ ''
];
return actions.join( '' );
}
- $( '#aaa-option-reset-data' ).on(
+ $( '#aaa-meta-reset-data' ).on(
'click',
function (e) {
e.preventDefault();
$.ajax(
{
- url: aaaOptionOptimizer.root + 'aaa-option-optimizer/v1/reset',
+ url: aaaMetaOptimizer.root + 'aaa-meta-optimizer/v1/reset',
method: 'POST',
- beforeSend: xhr => xhr.setRequestHeader( 'X-WP-Nonce', aaaOptionOptimizer.nonce ),
+ beforeSend: xhr => xhr.setRequestHeader( 'X-WP-Nonce', aaaMetaOptimizer.nonce ),
success: response => window.location = window.location.href + '&tracking_reset=true',
error: response => console.error(
'Failed to reset tracking.',
@@ -214,9 +209,9 @@ jQuery( document ).ready(
$.ajax(
{
- url: aaaOptionOptimizer.root + 'aaa-option-optimizer/v1/' + route,
+ url: aaaMetaOptimizer.root + 'aaa-option-optimizer/v1/' + route,
method: 'POST',
- beforeSend: xhr => xhr.setRequestHeader( 'X-WP-Nonce', aaaOptionOptimizer.nonce ),
+ beforeSend: xhr => xhr.setRequestHeader( 'X-WP-Nonce', aaaMetaOptimizer.nonce ),
data: requestData,
success: response => updateRowOnSuccess( response, table, optionName, action ),
error: response => console.error(
@@ -241,8 +236,8 @@ jQuery( document ).ready(
} else if ( action === 'add-autoload' || action === 'remove-autoload' ) {
const autoloadStatus = action === 'add-autoload' ? 'yes' : 'no';
const buttonHTML = action === 'add-autoload' ?
- '':
- '';
+ '':
+ '';
$( 'tr#option_' + optionName ).find( 'td.autoload' ).text( autoloadStatus );
const oldButton = 'button.' + ( action === 'add-autoload' ? 'add' : 'remove' ) + '-autoload';
diff --git a/known-plugins/known-plugins.json b/known-plugins/known-plugins.json
index 3f6db85..7b45850 100644
--- a/known-plugins/known-plugins.json
+++ b/known-plugins/known-plugins.json
@@ -1,317 +1,17 @@
{
- "aaa-option-optimizer": {
- "name": "AAA Option Optimizer",
- "option_prefixes": ["option_optimizer"]
- },
- "accessibility-checker": {
- "name": "Equalize Digital Accessibility Checker",
- "option_prefixes": ["edac_"]
- },
- "advanced-custom-fields": {
- "name": "Advanced Custom Fields",
- "option_prefixes": ["acf_"]
- },
- "affiliate-wp": {
- "name": "Affiliate WP",
- "option_prefixes": ["affwp_"]
- },
- "all-in-one-seo-pack": {
- "name": "AIOSEO - The Best WordPress SEO Plugin & Toolkit",
- "option_prefixes": ["aioseo_","widget_aioseo"]
- },
- "breeze": {
- "name": "Breeze - WordPress Cache Plugin",
- "option_prefixes": ["breeze_"]
- },
- "bunnycdn": {
- "name": "bunny.net - WordPress CDN Plugin",
- "option_prefixes": ["bunny"]
- },
- "burst": {
- "name": "Burst Statistics",
- "option_prefixes": ["burst_"]
- },
- "chaty": {
- "name": "Floating Chat Widget: Contact Chat Icons, WhatsApp, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty",
- "option_prefixes": ["chaty_"]
- },
- "complianz": {
- "name": "Complianz GDPR",
- "option_prefixes": ["cmplz_", "complianz_"]
- },
- "cookiebot": {
- "name": "Cookie banner plugin for WordPress – Cookiebot CMP by Usercentrics",
- "option_prefixes": ["cookiebot_", "cookiebot-"]
- },
- "duplicate-post": {
- "name": "Yoast Duplicate Post",
- "option_prefixes": ["duplicate_post_"]
- },
- "easy-digital-downloads": {
- "name": "Easy Digital Downloads",
- "option_prefixes": ["edd_"]
- },
- "elementor": {
- "name": "Elementor",
- "option_prefixes": ["elementor_"]
- },
- "fewer-tags": {
- "name": "Fewer Tags",
- "option_prefixes": ["fewer_tags"]
- },
- "fluentform": {
- "name": "Fluent Forms",
- "option_prefixes": ["_fluentform_", "fluentform_"]
- },
- "generateblocks": {
- "name": "GenerateBlocks",
- "option_prefixes": ["generateblocks_"]
- },
- "google-analytics-for-wordpress": {
- "name": "Google Analytics for WordPress by MonsterInsights",
- "option_prefixes": ["yst_"]
- },
- "gravity-forms": {
- "name": "Gravity Forms",
- "option_prefixes": ["gf_","gforms_"]
- },
- "indeed-membership-pro": {
- "name": "Indeed Ultimate Membership Pro",
- "option_prefixes": ["ihc_"]
- },
- "jetpack": {
- "name": "Jetpack",
- "option_prefixes": ["jetpack_"]
- },
- "js_composer": {
- "name": "Visual Composer Website Builder, Landing Page Builder, Custom Theme Builder, Maintenance Mode & Coming Soon Pages",
- "option_prefixes": ["vcv-"]
- },
- "litespeed-cache": {
- "name": "LiteSpeed Cache",
- "option_prefixes": ["litespeed-", "_litespeed_"]
- },
- "loginizer": {
- "name": "Loginizer",
- "option_prefixes": ["loginizer_"]
- },
- "perfmatters": {
- "name": "Perfmatters",
- "option_prefixes": ["perfmatters_"]
- },
- "pixel-caffeine": {
- "name": "Pixel Caffeine",
- "option_prefixes": ["aepc_"]
- },
- "pojo-accessibility": {
- "name": "One Click Accessibility",
- "option_prefixes": ["pojo_a11y"]
- },
- "porto-functionality": {
- "name": "Porto Theme - Functionality",
- "option_prefixes": ["porto_"]
- },
- "really-simple-ssl": {
- "name": "Really Simple SSL",
- "option_prefixes": ["rsssl_"]
- },
- "redirection": {
- "name": "Redirection",
- "option_prefixes": ["redirection_"]
- },
- "revslider": {
- "name": "Slider Revolution",
- "option_prefixes": ["revslider-"]
- },
- "seedprod": {
- "name": "Seedprod",
- "option_prefixes": ["seedprod", "seed_"]
- },
- "seo-by-rank-math": {
- "name": "Rank Math SEO with AI Best SEO Tools",
- "option_prefixes": ["rank_math_"]
- },
- "updraft": {
- "name": "Updraft Plus",
- "option_prefixes": ["updraft_", "updraftplus_"]
- },
- "yoast": {
- "name": "Yoast SEO",
- "option_prefixes": ["wpseo", "yoast_"]
- },
- "woocommerce": {
- "name": "WooCommerce",
- "option_prefixes": ["wc_", "_transient__woocommerce_", "woocommerce_"]
- },
- "wordfence": {
- "name": "Wordfence",
- "option_prefixes": ["wordfence_"]
- },
"wordpress": {
"name": "WordPress",
"option_prefixes": [
- "_site_transient_timeout_available_translations",
- "_site_transient_timeout_theme_roots",
- "_site_transient_update_core",
- "active_plugins",
- "admin_email",
- "adminhash",
- "auth_key",
- "auth_salt",
- "auto_core_update_notified",
- "auto_plugin_theme_update_emails",
- "auto_update_core_dev",
- "auto_update_core_major",
- "auto_update_core_minor",
- "auto_updater.lock",
- "avatar_default",
- "avatar_rating",
- "blacklist_keys",
- "blog_charset",
- "blog_public",
- "blogdescription",
- "blogname",
- "can_compress_scripts",
- "category_base",
- "category_children",
- "close_comments_days_old",
- "close_comments_for_old_posts",
- "comment_max_links",
- "comment_moderation",
- "comment_order",
- "comment_previously_approved",
- "comment_registration",
- "comment_whitelist",
- "comments_notify",
- "comments_per_page",
- "core_updater.lock",
- "cron",
- "current_theme",
- "date_format",
- "db_upgraded",
- "db_version",
- "default_category",
- "default_comment_status",
- "default_comments_page",
- "default_email_category",
- "default_link_category",
- "default_ping_status",
- "default_pingback_flag",
- "default_post_format",
- "default_role",
- "disallowed_keys",
- "embed_size_h",
- "embed_size_w",
- "finished_splitting_shared_terms",
- "finished_updating_comment_type",
- "fresh_site",
- "gmt_offset",
- "hack_file",
- "home",
- "html_type",
- "https_detection_errors",
- "https_migration_required",
- "image_default_align",
- "image_default_link_type",
- "image_default_size",
- "initial_db_version",
- "large_size_h",
- "large_size_w",
- "link_manager_enabled",
- "links_updated_date_format",
- "logged_in_key",
- "logged_in_salt",
- "mailserver_login",
- "mailserver_pass",
- "mailserver_port",
- "mailserver_url",
- "medium_large_size_h",
- "medium_large_size_w",
- "medium_size_h",
- "medium_size_w",
- "moderation_keys",
- "moderation_notify",
- "new_admin_email",
- "nonce_key",
- "nonce_salt",
- "page_comments",
- "page_for_posts",
- "page_on_front",
- "permalink_structure",
- "ping_sites",
- "posts_per_page",
- "posts_per_rss",
- "recently_activated",
- "recovery_keys",
- "require_name_email",
- "rewrite_rules",
- "rss_use_excerpt",
- "secure_auth_key",
- "secure_auth_salt",
- "show_on_front",
- "show_avatars",
- "show_comments_cookies_opt_in",
- "sidebars_widgets",
- "site_icon",
- "site_logo",
- "siteurl",
- "start_of_week",
- "sticky_posts",
- "stylesheet",
- "tag_base",
- "template",
- "theme_mods_",
- "theme_switched",
- "thumbnail_crop",
- "thumbnail_size_h",
- "thumbnail_size_w",
- "thread_comments",
- "thread_comments_depth",
- "time_format",
- "timezone_string",
- "uninstall_plugins",
- "upload_path",
- "upload_url_path",
- "uploads_use_yearmonth_folders",
- "use_balanceTags",
- "use_smilies",
- "use_trackback",
- "user_count",
- "users_can_register",
- "widget_",
- "wp_attachment_pages_enabled",
- "wp_force_deactivated_plugins",
- "wp_page_for_privacy_policy",
- "wp_user_roles",
- "WPLANG"
+ "_thumbnail_id",
+ "_wp_attached_file",
+ "_wp_attachment_image_alt",
+ "_wp_attachment_metadata",
+ "_wp_ignored_hooked_blocks",
+ "_wp_suggested_privacy_policy_content",
+ "is_wp_suggestion",
+ "origin",
+ "_edit_lock",
+ "_wp_page_template"
]
- },
- "worker": {
- "name": "ManageWP Worker",
- "option_prefixes": ["mwp_", "worker_"]
- },
- "wpcf7": {
- "name": "Contact From 7",
- "option_prefixes": ["wpcf7"]
- },
- "wpforms": {
- "name": "WPForms",
- "option_prefixes": ["wpforms_"]
- },
- "wpml": {
- "name": "WPML",
- "option_prefixes": ["_wpml_", "wpml_", "otgs-", "otgs_", "_icl_"]
- },
- "wp-optimize": {
- "name": "WP Optimize",
- "option_prefixes": ["wpo_", "wp-optimize"]
- },
- "wp-rocket": {
- "name": "WP Rocket",
- "option_prefixes": ["wp_rocket_", "rocket_"]
- },
- "wpvivid-backuprestore": {
- "name": "WPvivid Backup Plugin",
- "option_prefixes": ["wpvivid_"]
}
}
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 36a7308..a5d29c7 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -98,7 +98,7 @@
' . - sprintf( - // translators: %1$s is the date, %2$s is the number of options at stat, %3$s is the size at start in KB, %4$s is the number of options now, %5$s is the size in KB now. - esc_html__( 'When you started on %1$s you had %2$s autoloaded options, for %3$sKB of memory. Now you have %4$s options, for %5$sKB of memory.', 'aaa-option-optimizer' ), - esc_html( gmdate( 'Y-m-d', strtotime( $option_optimizer['starting_point_date'] ) ) ), - isset( $option_optimizer['starting_point_num'] ) ? esc_html( $option_optimizer['starting_point_num'] ) : '-', - number_format( ( $option_optimizer['starting_point_kb'] ), 1 ), - esc_html( $result->count ), - number_format( ( $result->autoload_size / 1024 ), 1 ) - ) . '
'; + echo '' . esc_html__( 'Tracking data has been reset.', 'aaa-option-optimizer' ) . '
' . esc_html__( 'Tracking data has been reset.', 'aaa-meta-optimizer' ) . '
' . esc_html__( 'We\'ve found the following things you can maybe optimize:', 'aaa-option-optimizer' ) . '
'; + echo ''; ?>' . esc_html__( 'The following options are autoloaded on each pageload, but AAA Option Optimizer has not been able to detect them being used.', 'aaa-option-optimizer' ); + echo '
' . esc_html__( 'The following meta fields are not used.', 'aaa-meta-optimizer' ); echo '
| ' . esc_html( $option ) . ' | '; echo '' . esc_html( $this->get_plugin_name( $option ) ) . ' | '; - echo '' . esc_html( $this->get_length( $value ) ) . ' | '; - echo 'yes | '; echo ''; - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output escaped in get_value_button. - echo $this->get_value_button( $option, $value ); - echo ' '; - echo ' '; echo ' |
' . esc_html__( 'All autoloaded options are in use.', 'aaa-option-optimizer' ) . '
'; + echo '' . esc_html__( 'All meta fields are in use.', 'aaa-meta-optimizer' ) . '
'; } ?>' . esc_html__( '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' ); + if ( ! empty( $meta_optimizer['used_meta_fields'] ) ) { + echo '
' . esc_html__( 'The following meta fields are being used.', 'aaa-meta-optimizer' ); echo '
| ' . esc_html( $option ) . ' | '; echo '' . esc_html( $this->get_plugin_name( $option ) ) . ' | '; - echo '' . esc_html( $this->get_length( $arr['value'] ) ) . ' | '; - echo 'no | '; - echo '' . esc_html( $arr['count'] ) . ' | '; + echo '' . esc_html( $arr ) . ' | '; echo ''; - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output escaped in get_value_button. - echo $this->get_value_button( $option, $arr['value'] ); - echo ' '; echo ' |
' . esc_html__( 'All options that are used are autoloaded.', 'aaa-option-optimizer' ) . '
'; - } - ?> -' . esc_html__( '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' ); - echo '
| ' . esc_html( $option ) . ' | '; - echo '' . esc_html( $this->get_plugin_name( $option ) ) . ' | '; - echo '' . esc_html( $count ) . ' | '; - echo ''; - } - echo ' |
' . esc_html__( 'There are no used meta fields.', 'aaa-meta-optimizer' ) . '
'; } ?>' . sprintf( esc_html__( 'Value of %s', 'aaa-option-optimizer' ), '' . esc_html( $name ) . '' ) . '
' . htmlentities( $string, ENT_QUOTES | ENT_SUBSTITUTE ) . '-