100% block-extras

Code Review | Block Extras

WordPress plugin Block Extras scored 100% from 54 tests.

About plugin

  • Plugin page: block-extras
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3.2
  • WordPress version: 5.9.2
  • First release: Jan 11, 2020
  • Latest release: Jan 12, 2020
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: gt81plugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 474 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼309.79ms] Passed 4 tests

This is a short check of server-side resources used by Block Extras
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0153.74 ▲4.01
Dashboard /wp-admin3.43 ▲0.0334.97 ▼47.46
Posts /wp-admin/edit.php3.66 ▲0.0243.31 ▲6.82
Add New Post /wp-admin/post-new.php6.96 ▼0.0193.44 ▼1,197.72
Media Library /wp-admin/upload.php3.31 ▲0.0226.47 ▲2.03
Block Extras /wp-admin/options-general.php?page=block-extras-admin-settings3.6527.99

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Block Extras
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,780 ▲2615.30 ▼0.387.58 ▲1.372.10 ▼0.91
Dashboard /wp-admin2,882 ▲216.13 ▼0.08126.11 ▼10.78166.20 ▲4.09
Posts /wp-admin/edit.php2,695 ▲53.24 ▼0.0064.46 ▼2.69140.63 ▼56.52
Add New Post /wp-admin/post-new.php1,683 ▼6821.15 ▲0.18412.52 ▼59.65174.16 ▲8.03
Media Library /wp-admin/upload.php1,705 ▲105.53 ▲0.02147.05 ▼33.48190.62 ▼8.14
Block Extras /wp-admin/options-general.php?page=block-extras-admin-settings16,14410.30216.89144.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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

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
7 plugin tags: extra attributes, page builder, gutenberg blocks, editor, blocks...

block-extras/block-extras.php Passed 13 tests

This is the main PHP file of "Block Extras" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
67 characters long description:
This plugin creates extra options for default Gutenberg block types

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
There were no executable files found in this plugin1,508 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP55914833
JavaScript29479432
SVG800241
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity49.50
▷ Minimum class complexity38.00
▷ Maximum class complexity61.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin