84% block-metadata

Code Review | Block Metadata

WordPress plugin Block Metadata scored 84% from 54 tests.

About plugin

  • Plugin page: block-metadata
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Aug 22, 2019
  • Latest release: Apr 15, 2020
  • Number of updates: 17
  • Update frequency: every 13.9 days
  • Top authors: leoloso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,123 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.69MB] [CPU: ▼15.50ms] Passed 4 tests

A check of server-side resources used by Block Metadata
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.86 ▼4.54
Dashboard /wp-admin3.31 ▲0.0148.86 ▼0.32
Posts /wp-admin/edit.php3.36 ▲0.0150.00 ▲5.74
Add New Post /wp-admin/post-new.php3.12 ▼2.7637.43 ▼59.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.94 ▲2.09

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Block Metadata
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.021.78 ▼0.2341.97 ▲3.79
Dashboard /wp-admin2,206 ▲175.91 ▲0.95106.70 ▼4.2540.59 ▼0.21
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0139.74 ▲5.5434.74 ▲2.93
Add New Post /wp-admin/post-new.php1,542 ▲818.05 ▼5.16593.93 ▼76.0054.68 ▲1.20
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0596.78 ▲0.6242.18 ▼6.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-metadata/block-metadata.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-metadata/src/WPGraphQL.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-metadata/src/WPGraphQL.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: gutenberg, api, medium-agnostic, platform-agnostic, content...

block-metadata/block-metadata.php Passed 13 tests

This is the main PHP file of "Block Metadata" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Extract all metadata from all Gutenberg blocks inside a post

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected386 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File191720

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity6.64
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods13100.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions116.67%
▷ Anonymous functions583.33%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin