PHPackages                             page-carbajal/wpexpress-query - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. page-carbajal/wpexpress-query

ActiveLibrary[Database &amp; ORM](/categories/database)

page-carbajal/wpexpress-query
=============================

A &lt;wpdb&gt; abstraction

1.1.0(3y ago)01781GPL3PHP

Since Jan 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Page-Carbajal/WPExpress-Query)[ Packagist](https://packagist.org/packages/page-carbajal/wpexpress-query)[ Docs](https://github.com/Page-Carbajal/WPExpress)[ RSS](/packages/page-carbajal-wpexpress-query/feed)WikiDiscussions development Synced 2mo ago

READMEChangelogDependenciesVersions (14)Used By (1)

WPExpress/Query
===============

[](#wpexpressquery)

An abstraction layer for WPDB.

Love **WordPress** I started looking for a composer package to abstract working with the **WPDB** the way we work with databases on other PHP projects.

None met my expectations, some try to skip the **WBDP** and write SQL on their own. WPDB is robust enough, I just want a wrapper that makes read and writing code easier.

The **Query** class is a container for static methods to instantiate every class (**Post**, **MetaField**, **Taxonomy**) related to the DB.

You can use **WPExpress/Query** to simplify your interactions with the WPDB and make your code easier to read and write.

**Run a DB Query for Custom Post Type BOOKS, and limit to 5 results**

```
function getFiveBooksPermalinks()
{
    $list = array();
    $fiveBooks = Query::Custom('book')->limit(5)->get();

    foreach($fiveBooks as $post)
    {
        $list[] = get_permalink($post->ID);
    }
    return $list;
}
```

**Run a DB Query to get 5 posts**

```
    $Posts = Posts()->limit(5)->get();

    foreach($Posts as $post)
    {
        // TODO: Write your code here
    }
```

Road Map
--------

[](#road-map)

### Next minor

[](#next-minor)

- Add methods insert, save and delete to Post class
- Develop methods for User class
    - insert
    - save
    - delete
    - resetPassword
    - get, get first, get last
    - getAll
    - getByMeta
    - getByEmail
- Add method Query::User. Returns an instance of User

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~316 days

Recently: every ~624 days

Total

9

Last Release

1247d ago

Major Versions

0.10.4 → 1.0.12018-02-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6569399b9a0526688fa1ee5893a44ef785598d68be41e4f5a4d1cb4b717ac30?d=identicon)[pagecarbajal](/maintainers/pagecarbajal)

---

Top Contributors

[![Page-Carbajal](https://avatars.githubusercontent.com/u/6045106?v=4)](https://github.com/Page-Carbajal "Page-Carbajal (38 commits)")

### Embed Badge

![Health badge](/badges/page-carbajal-wpexpress-query/health.svg)

```
[![Health](https://phpackages.com/badges/page-carbajal-wpexpress-query/health.svg)](https://phpackages.com/packages/page-carbajal-wpexpress-query)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
