Fetch database autoload size

Generally a good idea to keep your database autoload below 1MB in size. You can see the current usage with the following. For optimizing, I recommend reviewing Kinsta’s guide: https://kinsta.com/knowledgebase/wp-options-autoloaded-data/.

echo "$(wp db query "SELECT ROUND(SUM(LENGTH(option_value))/1024/1024, 2) as autoload_size_MB FROM $(wp db prefix)options WHERE autoload='yes';" --skip-column-names --batch ) MB"