Wp plugin search (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

Keyword search in the online plugin library maintained by WordPress.org. Max. 100 hits will be returned

$ wp plugin search

   <search>                  The string to search for.

   [--page=<page>]           Optional page to display.
                             default: 1

   [--per-page=<per-page>]   Optional number of results to display.
                             default: 10
   [--field=<field>]         Prints the value of a single field for each plugin.
   [--fields=<fields>]       Ask for specific fields from the API. Defaults to name,slug,author_profile,rating. Acceptable values:

    name: Plugin Name
    slug: Plugin Slug
    version: Current Version Number
    author: Plugin Author
    author_profile: Plugin Author Profile
    contributors: Plugin Contributors
    requires: Plugin Minimum Requirements
    tested: Plugin Tested Up To
    compatibility: Plugin Compatible With
    rating: Plugin Rating
    num_ratings: Number of Plugin Ratings
    homepage: Plugin Author’s Homepage
    description: Plugin’s Description
    short_description: Plugin’s Short Description 

[--format=<format>]          Render output in a particular format.

    default: table
    options:
    – table
    – csv
    – count
    – json
    – yaml

Example: WooCommerce VAT-plugin

$ wp plugin search woocommerce-eu-vat-number --per-page=100

Success: Showing 48 of 48 plugins.
+-----------------------------------------------------+-----------------------------------------------------+--------+
| name                                                | slug                                                | rating |
+-----------------------------------------------------+-----------------------------------------------------+--------+
| WooCommerce PDF Invoices, Packing Slips, Delivery N | print-invoices-packing-slip-labels-for-woocommerce  | 96     |
| otes and Shipping Labels                            |                                                     |        |
| WooCommerce EU VAT Assistant                        | woocommerce-eu-vat-assistant                        | 100    |
| EU/UK VAT Compliance Assistant for WooCommerce      | woocommerce-eu-vat-compliance                       | 96     |
| Germanized for WooCommerce                          | woocommerce-germanized                              | 96     |
...

| easyReservations                                    | easyreservations                                    | 76     |
| CentroBill Payment Gateway for WooCommerce          | centrobill-payment-gateway                          | 0      |
+-----------------------------------------------------+-----------------------------------------------------+--------+

Multiple search terms

It seems that multiple search terms are treated as OR, rather than AND:

$ wp plugin search "google fonts"

Success: Showing 10 of 1010 plugins.
+-----------------------------------------------------------------------------------------+-----------------------------+--------+
| name                                                                                    | slug                        | rating |
+-----------------------------------------------------------------------------------------+-----------------------------+--------+
| Disable and Remove Google Fonts                                                         | disable-remove-google-fonts | 96     |
| Fonts Plugin | Google Fonts Typography                                                  | olympus-google-fonts        | 100    |
| Local Google Fonts                                                                      | local-google-fonts          | 100    |
| OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy.                                 | host-webfonts-local         | 94     |
| Site Kit by Google – Analytics, Search Console, AdSense, Speed                    | google-site-kit             | 82     | ← Why is this included?
| WP Google Fonts                                                                         | wp-google-fonts             | 80     |
| Toolkit for Block Theme (Gutenberg Blocks, Templates, Patterns, Google Fonts) – Twentig | twentig                     | 98     |
| Easy Google Fonts                                                                       | easy-google-fonts           | 92     |
| Swap Google Fonts Display                                                               | swap-google-font-display    | 88     |
| Embed Google Fonts                                                                      | embed-google-fonts          | 100    |
+-----------------------------------------------------------------------------------------+-----------------------------+--------+

This seems even clearer with more results - Like wp plugin search "google fonts" --per-page=100 in this example.

Same results as wordpress.org

It seems that the database behind this plugin, is the same as behind WordPress.org. Example:

Search results on Wordpress.org » Plugins » google fonts - Same results as through wp plugin search

Not the result you wanted?

Some reasons why the results might not be what I hoped for:

  • Payed-for plugins are excluded
  • Abandoned plugins, or plugins with compatibility issues, or otherwise non-approved plugins, are excluded. This is usually a sign to me, that I'm looking for the wrong solution.

Sources