71% block-options

Code Review | Gutenberg Block Editor Toolkit – EditorsKit

WordPress plugin Gutenberg Block Editor Toolkit – EditorsKit scored71%from 54 tests.

About plugin

  • Plugin page: block-options
  • Plugin version: 1.40.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2018
  • Latest release: Sep 30, 2023
  • Number of updates: 98
  • Update frequency: every 20.9 days
  • Top authors: phpbits (68.37%)munirkamal (22.45%)editorskit (10.2%)kbat82 (2.04%)

Code review

54 tests

User reviews

150 reviews

Install metrics

30,000+ active /656,829 total downloads

Benchmarks

Plugin footprint 82% 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.76MB] [CPU: ▲204.44ms] 75% from 4 tests

Analyzing server-side resources used by Gutenberg Block Editor Toolkit – EditorsKit
The following require your attention
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 204.44ms on /wp-admin/admin.php?page=gutenberghub-styles-manager)
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.73265.27 ▲229.23
Dashboard /wp-admin4.08 ▲0.74230.02 ▲170.31
Posts /wp-admin/edit.php4.14 ▲0.78243.60 ▲197.55
Add New Post /wp-admin/post-new.php7.09 ▲1.20318.28 ▲220.65
Media Library /wp-admin/upload.php4.01 ▲0.78284.02 ▲250.97
EditorsKit /wp-admin/admin.php?page=editorskit-getting-started5.57227.43
Styles Manager /wp-admin/admin.php?page=gutenberghub-styles-manager3.99249.68

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 407 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
editorskit_activation_marker
_ek_is_styles_manager_cpt_flashed

Browser metrics Passed 4 tests

Gutenberg Block Editor Toolkit – EditorsKit: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9514.47 ▲0.101.83 ▲0.1140.04 ▼1.23
Dashboard /wp-admin2,252 ▲604.84 ▼0.06112.39 ▲1.4743.03 ▲1.51
Posts /wp-admin/edit.php2,138 ▲492.05 ▲0.0741.49 ▲6.6836.75 ▲3.69
Add New Post /wp-admin/post-new.php1,688 ▲16027.77 ▲4.50747.37 ▲81.8953.35 ▼2.29
Media Library /wp-admin/upload.php1,440 ▲524.26 ▲0.10108.77 ▲14.1345.66 ▼0.14
EditorsKit /wp-admin/admin.php?page=editorskit-getting-started1,67518.70535.97120.93
Styles Manager /wp-admin/admin.php?page=gutenberghub-styles-manager1,85812.52130.5138.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • editorskit_activation_marker
    • db_upgraded
    • theysaidso_admin_options
    • _ek_is_styles_manager_cpt_flashed
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/block-options/includes/addons/template-library/gutenberghub-template-library-assets.php
    • > /wp-content/plugins/block-options/includes/addons/template-library/gutenberghub-template-library.php
    • > /wp-content/plugins/block-options/includes/class-editorskit-addon-manager.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-options/includes/addons/styles-manager/blocks/gutenberghub-styles-manager-block.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-options/includes/addons/styles-manager/gutenberghub-styles-manager-blocks.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/block-options/includes/addons/template-library/rest-api/controllers/gutenberghub-template-library-controller.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'EDITORSKIT_PLUGIN_ADDON_PATHstyles-manager/rest-api/init.php' (include_path='.:/usr/share/php') in wp-content/plugins/block-options/includes/addons/styles-manager/gutenberghub-styles-manager-main.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-options/includes/helper.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-options/includes/class-editorskit-plugin-shortcuts.php:19
    • > PHP Warning
      Use of undefined constant EDITORSKIT_PLUGIN_URL - assumed 'EDITORSKIT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/block-options/includes/class-editorskit-plugin-images-links.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-options/includes/addons/styles-manager/gutenberghub-styles-manager-core.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/block-options/includes/addons/styles-manager/templates/blank.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-options/includes/class-editorskit-block-locking.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=editorskit-getting-started
    • > Network (severe)
    var/www/wordpress/wp-content/plugins/block-options/build/styles-manager-addon.js?ver=65263a4d0be6d - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gutenberghub-styles-manager
    • > Network (severe)
    index.php/wp-json/wp/v2/gsm_styles?search=&page=1&per_page=5&gsm_block=undefined&status=publish%2Cdraft&_locale=user - Failed to load resource: the server responded with a status of 400 (Bad Request)
    • > GET request to /wp-admin/admin.php?page=gutenberghub-styles-manager
    • > Console-api (severe) in unknown
    /wp-content/plugins/block-options/build/styles-manager-addon-admin.js?ver=65263a506be6c 0:36055 Response

Optimizations

Plugin configuration 86% 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:
  • Screenshots: These screenshots do not have images: #1 (Text and Highlight Colors), #2 (Gutenberg Editor Rich Text Formats), #3 (Responsive and User Logged-in State Visibility), #4 (Block Settings), #5 (Image and Cover Block Styles), #6 (Settings and Options), #7 (Custom Classes Utility and Auto Suggestions), #8 (Code Editor Mode Syntax Highlighter), #9 (Drag and Drop Featured Image Upload), #10 (Link rel attributes nofollow and sponsored option)
The official readme.txt is a good inspiration

block-options/plugin.php 77% from 13 tests

The main file in "Gutenberg Block Editor Toolkit – EditorsKit" v. 1.40.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("block-options.php" instead of "plugin.php")

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
There were no executable files found in this plugin76,996 lines of code in 382 files:
LanguageFilesBlank linesComment linesLines of code
JSON70059,488
JavaScript2301,7141,46611,335
Sass56780182,946
PHP487181,4862,903
Markdown311540247
CSS69044
XML21024
TypeScript1108
Bourne Shell1001

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.53
Average class complexity13.90
▷ Minimum class complexity1.00
▷ Maximum class complexity144.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes413.33%
Methods126
▷ Static methods1612.70%
▷ Public methods10885.71%
▷ Protected methods00.00%
▷ Private methods1814.29%
Functions20
▷ Named functions735.00%
▷ Anonymous functions1365.00%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 1.10MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-10.png66.34KB39.85KB▼ 39.92%
screenshot-2.png84.96KB45.25KB▼ 46.74%
screenshot-4.png78.00KB45.19KB▼ 42.06%
images/templates.png148.97KB52.83KB▼ 64.54%
screenshot-8.png183.47KB82.45KB▼ 55.06%