99% inline-js-block-for-gutenberg

Code Review | Inline JS Block for Gutenberg

WordPress plugin Inline JS Block for Gutenberg scored 99% from 54 tests.

About plugin

  • Plugin page: inline-js-block-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 5.8.1
  • First release: Jul 19, 2018
  • Latest release: Jul 19, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: hiddenpearls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,837 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Inline JS Block for Gutenberg
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0142.31 ▲7.06
Dashboard /wp-admin3.06 ▲0.0147.59 ▲1.34
Posts /wp-admin/edit.php3.12 ▲0.0148.56 ▲4.45
Add New Post /wp-admin/post-new.php5.42 ▼0.0195.24 ▼544.98
Media Library /wp-admin/upload.php3.01 ▼0.0033.43 ▼11.91

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Inline JS Block for Gutenberg
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.74 ▲0.039.63 ▼0.7445.71 ▲0.62
Dashboard /wp-admin2,973 ▲395.91 ▼0.13166.04 ▲4.21110.62 ▲3.58
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0074.05 ▲0.7284.01 ▼5.78
Add New Post /wp-admin/post-new.php1,506 ▼16618.89 ▲0.29400.91 ▲15.26124.02 ▲20.78
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.00163.71 ▼5.95107.49 ▼18.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (coming soon) image not found
Please take inspiration from this readme.txt

inline-js-block-for-gutenberg/inline-js-block-gutenberg.php 77% from 13 tests

This is the main PHP file of "Inline JS Block for Gutenberg" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("inline-js-block-for-gutenberg.php" instead of "inline-js-block-gutenberg.php")

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
There were no executable files found in this plugin155 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12642122
CSS14020
PHP182413

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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 functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin