npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wp-plugin-ss

v0.3.1

Published

[![Build Status](https://travis-ci.org/chrishalbert/wp-plugin-ss.svg?branch=master)](https://travis-ci.org/chrishalbert/wp-plugin-ss) [![Coverage Status](https://coveralls.io/repos/github/chrishalbert/wp-plugin-ss/badge.svg?branch=master)](https://coveral

Downloads

28

Readme

Wordpress Plugin Simplified Search

Build Status Coverage Status License: MIT

A Node API that provides filtering and sorting for WordPress Plugins.

(or wp-plugin-ss, if you are into the brevity thing)

Why?

Searching for plugins on Wordpress.org can be time consuming since you cannot add filters
to specific fields and there is no such thing as sorting. To minimize these headaches, these features were introduced via wp-plugin-ss for you to use or extend upon.

Dependencies

MongoDb (required)

The WordPress Plugin Simplified Search API returns results directly from MongoDB. A data dump is available in the dump folder.

Redis (optional)

If you would like something more up to date than the data dump, you can run the cron and then run workers to up date your Mongo data.

Installation

You will need to add configurations somehow, and then you can either add this to a project, or it run it locally.

Configurations

Determine the configuration variables and save this to a /path/to/file.

export WP_PLUGIN_SS_MONGODB_URI=mongodb://127.0.0.1:27017/test
export WP_PLUGIN_SS_REDIS_URL=redis://127.0.0.1:19879
export WP_PLUGIN_SS_REDIS_QUEUE=plugins

You will either need to run the above script (locally) or assign these values in your IDE/cloud service. If not, export configurations to environment locally:

$ chmod 777 /path/to/file # Makes it executable
$ . /path/to/file         # Runs the script above

Add to Project

$ npm install wp-plugin-ss

Run Locally

This is good if you want to do some searches for yourself and test it out (replace the values in braces, likely localhost and 27017 if local).

$ npm install wp-plugin-ss -g    # Installs the API
$ mongorestore --db {mongo db} --host {mongo host} --port {mongo port}  ~/.npm-packages/lib/node_modules/wp-plugin-ss/dump/test 
$ . /path/to/file                # Loads the configuration
$ wp-plugin-ss                   # Starts the API

Populate database:

Run this to populate your mongo database with some starting data.

$ mongorestore --db {mongo db} --host {mongo host} --port {mongo port}  ~/.npm-packages/lib/node_modules/wp-plugin-ss/dump/test 

Run

Use swagger docs to test at http://127.0.0.1:3000/api-docs/

OR

Go to http://127.0.0.1:3000/plugins and consult the API Usage below

Usage

GET /plugins

Parameters

  • search (required) — (string) Search text passed directly to the WordPress Plugin Search. Must be 3 characters.
  • author - Filters by author name.
  • minRating - (integer) Filter by having at least minRating
  • maxRating - (integer) Filter by having at most maxRating
  • minReviews - (integer) Filter by having at least minReviews
  • maxReviews - (integer) Filter by having at most maxReviews
  • minInstalls - (integer) Filter by having at least minInstalls
  • maxInstalls - (integer) Filter by having at most maxInstalls
  • minVersion - (string) Filter by having at least minVersion
  • maxVersion - (string) Filter by having at most maxVersion
  • sort — Comma separated list of values. Sorts ascending unless preceeded with minus symbol -
    Recognized values:
    • 'ratings'
    • 'reviews'
    • 'installs'
    • 'authors'
    • 'name'
    • 'version'

Examples:

Get SEO plugins with at least a rating of 4.

http://127.0.0.1:3000/plugins?search=seo&minRatings=4

Get input plugins with at least 1000 installs ordering by name.

http://127.0.0.1:3000/plugins?search=input&minInstalls=1000&sort=name

Get analytics plugins order by the most ratings first (descending)

http://127.0.0.1:3000/plugins?search=analytics&sort=-ratings

Get ajax plugin ordered by most recent version tested and then most installs.

http://127.0.0.1:3000/plugins?search=ajax&sort=-version,-installs