bobbingwide / wp-top12

Measuring effect on server response of the Top 12 WordPress plugins
Apache License 2.0
0 stars 0 forks source link

Develop routine to find block based plugins and their blocks #10

Open bobbingwide opened 3 years ago

bobbingwide commented 3 years ago

wordpress.org has a special classification for block based plugins. You can see the full list at https://wordpress.org/plugins/browse/blocks Currently there are 25 pages - a figure which doesn't appear to have changed much since last year.

Requirement

I want to be able to find all the block plugins and determine which blocks they deliver. This would then be fed into blocks.wp-a2z.org Specifically, today, I'm looking for blocks that display charts.

Background

Proposed solution

It should also be possible to access the block.json file for single block plugins.

bobbingwide commented 3 years ago

In October 2019, wordpress.org would display the list of known blocks as description list as documented by wp_block_counter::get_test_string().

<div id="blocks" class="plugin-blocks section">
<h2 id="blocks-header">Blocks</h2>
<p>This plugin provides 2 blocks.</p>
<dl>
<dt>hmp/google-review-form-block</dt>
<dd></dd>
<dt>hmp/google-review-block</dt>
<dd></dd>
</dl>
</div>

The format of the output is now an unordered list.

<div id="blocks" class="plugin-blocks section">
<h2 id="blocks-header">Blocks</h2>
<p>This plugin provides 1 block.</p>
<ul class="plugin-blocks-list">
<li class="plugin-blocks-list-item has-description">
<span class="block-icon dashicons dashicons-list-view"></span>
<span class="block-title">Children</span>
<span class="block-description">List children of the current content as links.</dd>
</li>
</ul>
</div>

The information gathered using this method is not fit for purpose.

  1. The block name is no longer included ( eg oik-sb/children ).
  2. For some plugins, if there is more than one block, then the list of items appear identical.
  3. 158 of 472 plugins don't list blocks - identified with a description of YGIAGAM

Additionally,

  1. The list of plugins stops at 24 pages. 472 plugins.
  2. It doesn't include plugins that I know to be single block or otherwise block related plugins. eg oik, uk-tides

Therefore, at present, I conclude that this extraction process is flawed. It's not going to find a complete, useable list of blocks.

Number returned = 1273 ( 1433 - 158 )

What I need is access to the block taxonomy.