Skip to content

Instantly share code, notes, and snippets.

@dannyvankooten
Last active October 29, 2025 11:30
Show Gist options
  • Select an option

  • Save dannyvankooten/265327a6c3c5cb48cda8d236341c28dc to your computer and use it in GitHub Desktop.

Select an option

Save dannyvankooten/265327a6c3c5cb48cda8d236341c28dc to your computer and use it in GitHub Desktop.

Revisions

  1. dannyvankooten revised this gist Oct 29, 2025. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion search-wp-plugins.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    window.fetch('https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&per_page=500&search=forms').then(r => r.json()).then(d => {
    console.log(d.plugins.sort((a, b) => a.downloaded < b.downloaded));
    let sortedPlugins = d.plugins.sort((a, b) => a.downloaded < b.downloaded);
    console.log("plugins", sortedPlugins);
    console.log(sortedPlugins.map(p => `${p.name} (${p.slug}): ${Math.round(p.downloaded/1000)}K downloads`).join("\n"));
    });
  2. dannyvankooten revised this gist Oct 29, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion search-wp-plugins.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    window.fetch('https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&per_page=500&search=foobar').then(r => r.json()).then(d => {
    window.fetch('https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&per_page=500&search=forms').then(r => r.json()).then(d => {
    console.log(d.plugins.sort((a, b) => a.downloaded < b.downloaded));
    });
  3. dannyvankooten created this gist Oct 29, 2025.
    3 changes: 3 additions & 0 deletions search-wp-plugins.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    window.fetch('https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&per_page=500&search=foobar').then(r => r.json()).then(d => {
    console.log(d.plugins.sort((a, b) => a.downloaded < b.downloaded));
    });