WordPress / WordPress/sqlite-database-integration

CI: Monitor support for all the SQL queries used by all the WordPress plugins

Open
#159 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement quality
Dominant language
PHP
Stars
363
Forks
67
Avg merge
2d 15h
Merged PRs (30d)
7

Description

Goals

  • Quantify the improvements we'll get with the new approach to SQL
  • Publish the data in an open way everyone can see
  • Monitor MySQL support over time

Let's go through all the open-source PHP code in the WordPress ecosystem, extract SQL queries where we can recognize them, and run them all through the SQLite on the upcoming MySQL driver.

Implementation ideas

Sourcing plugins

WordPress plugins data sources:

Parsing queries

Here's a few ways to approach this:

  • @bgrgicak mentioned there's an open-source Woo quality toolkit that can potentially help here.
  • Use token_get_all or the PHP-Parser to find all the $wpdb->query() calls in the plugin (and, over time, also mysql_query etc.)
  • Create a custom PHPCS rule

Let's only process the queries that can easily be analyzed statically, like $wpdb->query("SELECT * FROM table WHERE a=b");. For v1 let's completely ignore plugins stitching SQL from multiple strings like `$query .= " WHERE a=b";.

Publishing the data

Let's publish structured data on GitHub. Maybe as JSON? Let's assign each report a date and keep the old reports in place so everyone can see the progress each change makes. We could eventually include these reports in the SQLite integration CHANGELOG.

Let's lean on the error reporting tools and publishing pipelines explored by @bgrgicak here: https://github.com/bgrgicak/playground-tester.

cc @akirk @JanJakes @wojtekn @jeroenpf @fuilddot @danielbachhuber

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the upcoming MySQL driver in PR 157 and the error-reporting and publishing approach in playground-tester. Then assess plugin sources and static query extraction via token_get_all or PHP-Parser. Done means dated, structured reports are published on GitHub and MySQL support can be monitored over time.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php, sqlite
Domain
ci-cd, databases, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.