83% blocks-everywhere

Code Review | Blocks Everywhere

WordPress plugin Blocks Everywhere scored83%from 54 tests.

About plugin

  • Plugin page: blocks-everywhere
  • Plugin version: 1.21.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 8, 2022
  • Latest release: Oct 18, 2023
  • Number of updates: 46
  • Update frequency: every 7.6 days
  • Top authors: johnny5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,557 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.55ms] Passed 4 tests

An overview of server-side resources used by Blocks Everywhere
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2238.87 ▼0.41
Dashboard /wp-admin3.52 ▲0.2245.91 ▼3.28
Posts /wp-admin/edit.php3.63 ▲0.2848.45 ▲0.94
Add New Post /wp-admin/post-new.php6.10 ▲0.2283.84 ▼11.43
Media Library /wp-admin/upload.php3.44 ▲0.2236.80 ▲3.27

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blocks Everywhere
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲313.90 ▼0.441.74 ▼0.0442.04 ▲0.93
Dashboard /wp-admin2,192 ▲155.54 ▼0.1180.58 ▼3.3634.53 ▼7.37
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0438.05 ▲3.6134.79 ▲1.07
Add New Post /wp-admin/post-new.php1,535 ▲618.42 ▼4.71597.99 ▼82.1965.95 ▲15.34
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0294.18 ▼4.2440.44 ▼4.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Blocks_Everywhere\\Handler\\Handler' not found in wp-content/plugins/blocks-everywhere/classes/handlers/class-bbpress.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Blocks_Everywhere\\add_action() in wp-content/plugins/blocks-everywhere/blocks-everywhere.php:60
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Blocks_Everywhere\\Handler\\Handler' not found in wp-content/plugins/blocks-everywhere/classes/handlers/class-buddypress.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Blocks_Everywhere\\Handler\\Handler' not found in wp-content/plugins/blocks-everywhere/classes/handlers/class-comments.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Gutenberg in a comment form), #2 (Gutenberg when editing a comment)
The official readme.txt is a good inspiration

blocks-everywhere/blocks-everywhere.php 85% from 13 tests

The main PHP script in "Blocks Everywhere" version 1.21.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,509 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity18.50
▷ Minimum class complexity2.00
▷ Maximum class complexity41.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
▷ Static methods11.61%
▷ Public methods4877.42%
▷ Protected methods23.23%
▷ Private methods1219.35%
▷ Named functions00.00%
▷ Anonymous functions11100.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.74KB12.44KB▼ 74.48%
screenshot-2.png55.95KB14.87KB▼ 73.43%
build/images/wordpress.e7ce7231.png1.78KB1.69KB▼ 4.99%