[wp-trac] [WordPress Trac] #58694: Enhancement in wordpress Database API

WordPress Trac noreply at wordpress.org
Sat Jul 1 12:11:09 UTC 2023


#58694: Enhancement in wordpress Database API
-------------------------------------------------+-------------------------
 Reporter:  mdesignfa                            |      Owner:  (none)
     Type:  feature request                      |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  Database                             |    Version:  6.2.2
 Severity:  normal                               |   Keywords:  needs-
  Focuses:  performance, sustainability,         |  screenshots
  coding-standards                               |
-------------------------------------------------+-------------------------
 Hi

 im a wordpress developer and freelancer

 i also do wordpress Database optimization for my customers and I have a
 very smart suggestion to optimize the database structure of Beloved
 WordPress!

 issue: Keep in mind that every plugin and theme installed in WordPress
 will inject some data (options/post-metas/ etc) to the wpdb and when you
 remove them their data will remain (unused) inside user wp database with
 no clue or indication of what template or plugin the information was for!


 My suggestion: you can simply add an extra Argument for the core functions
 for adding options or metas (update_option or
 update_post_meta/update_user_meta) this Arg will add that plugin or theme
 base name to the added option or meta added like this ->
 update_option("myopt", "myvalue", $autoload, "wooslider")
 which the 4th arg is the name of my example plugin and its REQUIRED type
 ALSO the name of the plg/theme can be auto inserted from an PHP constant
 -> (define('WOODMART_CORE', __FILE__); )

 NOTE: By using this new system, whenever a person wants to manually
 optimize the database, she/he can easily find out which information is not
 needed and quickly query and delete them, Also, the plugins that perform
 database cleaning are much easier and more efficient, fully automatically
 find out which plugins no longer exist and which information is related to
 them and can be deleted without any trouble!

 See the pic plz...

 https://mdezign.ir/wp-content/uploads/2023/07/aasdsadasdasd.jpg

 Consider this as a Great New development in order to optimize and speed up
 all WordPress sites!

 Thanks a lot.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58694>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list