94% rest-gutenberg

Code Review | REST Gutenberg

WordPress plugin REST Gutenberg scored 94% from 54 tests.

About plugin

  • Plugin page: rest-gutenberg
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 5.8.1
  • First release: May 1, 2019
  • Latest release: May 5, 2019
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: scottfoster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 6,970 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by REST Gutenberg
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1242.86 ▲22.20
Dashboard /wp-admin3.06 ▲0.0144.95 ▲2.71
Posts /wp-admin/edit.php3.12 ▲0.0148.24 ▲5.30
Add New Post /wp-admin/post-new.php5.43 ▼0.0187.64 ▼556.89
Media Library /wp-admin/upload.php3.01 ▲0.0134.20 ▲5.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for REST Gutenberg
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.04 ▲0.459.32 ▼0.8447.30 ▲0.77
Dashboard /wp-admin2,970 ▲365.96 ▲0.04142.19 ▼10.44111.24 ▲8.33
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0069.76 ▲1.0885.20 ▲3.82
Add New Post /wp-admin/post-new.php3,687 ▲2,18716.57 ▼2.04478.49 ▲95.05110.23 ▲7.14
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.01153.91 ▼42.14114.83 ▼6.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rest-gutenberg/rest-gutenberg.php:11

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: wp-api, api, gutenberg, rest, json

rest-gutenberg/rest-gutenberg.php Passed 13 tests

This is the main PHP file of "REST Gutenberg" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Adds a key and gutenberg block scehma within the WordPress REST API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14729

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ 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
PNG images were not found in this plugin