84% wpgraphql-blocks

Code Review | WPGraphQL Blocks

WordPress plugin WPGraphQL Blocks scored84%from 54 tests.

About plugin

  • Plugin page: wpgraphql-blocks
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 13, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 13
  • Update frequency: every 14.8 days
  • Top authors: tomphill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.33ms] Passed 4 tests

An overview of server-side resources used by WPGraphQL Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.04 ▼6.22
Dashboard /wp-admin3.31 ▲0.0146.16 ▼12.00
Posts /wp-admin/edit.php3.36 ▲0.0050.41 ▲0.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.93 ▼4.01
Media Library /wp-admin/upload.php3.23 ▲0.0037.13 ▲1.10

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPGraphQL Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.35 ▲0.191.75 ▲0.2035.75 ▼7.70
Dashboard /wp-admin2,195 ▲155.62 ▼0.0592.88 ▲3.0942.87 ▲3.33
Posts /wp-admin/edit.php2,097 ▼31.94 ▼0.0240.53 ▲1.9536.57 ▼0.22
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▲0.12605.32 ▼15.5359.79 ▲11.08
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0294.09 ▼5.7043.14 ▲0.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpgraphql-blocks/plugin.php

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wpgraphql-blocks/plugin.php 92% from 13 tests

"WPGraphQL Blocks" version 2.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpgraphql-blocks.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin724 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP211686692
Markdown112032

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity56.00
▷ Minimum class complexity22.00
▷ Maximum class complexity90.00
Average method complexity46.00
▷ Minimum method complexity2.00
▷ Maximum method complexity90.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin