62% gutenberg

Code Review | Gutenberg

WordPress plugin Gutenberg scored62%from 54 tests.

About plugin

  • Plugin page: gutenberg
  • Plugin version: 17.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2017
  • Latest release: Dec 1, 2023
  • Number of updates: 945
  • Update frequency: every 2.5 days
  • Top authors: gutenbergplugin (53.44%)youknowriad (14.5%)matveb (7.94%)mcsf (4.76%)jorgefilipecosta (3.6%)

Code review

54 tests

User reviews

3712 reviews

Install metrics

300,000+ active /38,984,751 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.96MB] [CPU: ▲5.84ms] Passed 4 tests

Analyzing server-side resources used by Gutenberg
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.92 ▲4.4658.74 ▲19.58
Dashboard /wp-admin7.97 ▲4.6758.40 ▲11.48
Posts /wp-admin/edit.php7.98 ▲4.6264.64 ▲16.52
Add New Post /wp-admin/post-new.php7.97 ▲2.0959.64 ▼24.21
Media Library /wp-admin/upload.php7.97 ▲4.7571.89 ▲35.64
Experiments /wp-admin/admin.php?page=gutenberg-experiments7.9859.91
Demo /wp-admin/admin.php?page=gutenberg7.9856.43

Server storage [IO: ▲41.06MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Total filesystem usage must be limited to 25MB (currently using 41.06MB)
Filesystem: 925 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
gutenberg_version_migration
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gutenberg
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6412.73 ▼1.621.68 ▼0.0038.27 ▼0.72
Dashboard /wp-admin2,232 ▲553.34 ▼2.1889.69 ▼8.6641.47 ▼1.68
Posts /wp-admin/edit.php2,134 ▲341.99 ▼0.0334.61 ▼6.0332.54 ▼4.22
Add New Post /wp-admin/post-new.php1,585 ▲5917.26 ▼5.74722.42 ▲24.8046.82 ▼13.95
Media Library /wp-admin/upload.php1,440 ▲404.24 ▲0.07111.19 ▲5.3648.19 ▲4.26
Experiments /wp-admin/admin.php?page=gutenberg-experiments9172.0021.4725.00
Demo /wp-admin/admin.php?page=gutenberg2,28229.221,070.9075.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function 1 was called incorrectly. `experimental-link-color` is no longer supported. Use `link-color` instead. Please see Debugging in WordPress for more information. (This message was added in version 6.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • gutenberg_version_migration
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 56 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gutenberg
    • > User notice in wp-includes/functions.php+5905
    Function 1 was called incorrectly. `experimental-link-color` is no longer supported. Use `link-color` instead. Please see Debugging in WordPress for more information. (This message was added in version 6.3.0.)

SRP 0% 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
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gutenberg/lib/load.php
    • > /wp-content/plugins/gutenberg/lib/rest-api.php
    • > /wp-content/plugins/gutenberg/lib/client-assets.php
    • > /wp-content/plugins/gutenberg/lib/experimental/rest-api.php
    • > /wp-content/plugins/gutenberg/lib/demo.php
    • > /wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/rest-api.php
    • > /wp-content/plugins/gutenberg/lib/compat/wordpress-6.5/rest-api.php
  • 160× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gutenberg/lib/experimental/blocks.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg/build/block-library/blocks/post-date.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg/lib/blocks.php:176
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg/build/block-library/blocks/site-title.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg/build/block-library/blocks/post-comments-count.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg/lib/experimental/navigation-theme-opt-in.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gutenberg/lib/experimental/fonts-api/fonts-api.php:224
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg/build/block-library/blocks/query-no-results.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Block_Supports' not found in wp-content/plugins/gutenberg/lib/block-supports/layout.php:833
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/gutenberg/gutenberg.php on line 60

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
No plugin tags provided

gutenberg/gutenberg.php Passed 13 tests

This is the main PHP file of "Gutenberg" version 17.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
133 characters long description:
Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected296,777 lines of code in 776 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14440,97280,915267,045
PHP2884,66716,16022,756
JSON106006,433
Markdown31320308
CSS23500235

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity31.09
▷ Minimum class complexity1.00
▷ Maximum class complexity466.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes45.80%
▷ Concrete classes6594.20%
▷ Final classes23.08%
Methods603
▷ Static methods23438.81%
▷ Public methods36460.36%
▷ Protected methods6310.45%
▷ Private methods17629.19%
Functions504
▷ Named functions46892.86%
▷ Anonymous functions367.14%
Constants38
▷ Global constants513.16%
▷ Class constants3386.84%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin