90% attributes-for-blocks

Code Review | Attributes for Blocks

WordPress plugin Attributes for Blocks scored90%from 54 tests.

About plugin

  • Plugin page: attributes-for-bl...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 25, 2021
  • Latest release: Jul 17, 2023
  • Number of updates: 8
  • Update frequency: every 86.5 days
  • Top authors: websevendev (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /8,230 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.62ms] Passed 4 tests

Server-side resources used by Attributes for Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0344.34 ▼0.51
Dashboard /wp-admin3.37 ▼0.0148.13 ▼15.98
Posts /wp-admin/edit.php3.42 ▲0.0353.19 ▲4.24
Add New Post /wp-admin/post-new.php5.96 ▲0.0495.43 ▲1.76
Media Library /wp-admin/upload.php3.29 ▲0.0341.39 ▲7.32

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Attributes for Blocks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.172.04 ▲0.2444.90 ▼2.61
Dashboard /wp-admin2,209 ▲215.92 ▲0.0297.56 ▼15.6536.04 ▼6.24
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0039.80 ▲2.5735.07 ▲0.55
Add New Post /wp-admin/post-new.php1,538 ▲1023.33 ▼0.02713.61 ▲96.8966.92 ▲14.78
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0492.74 ▼6.9242.22 ▲0.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: style, onclick, id, blocks, data...

attributes-for-blocks/attributes-for-blocks.php Passed 13 tests

The main PHP file in "Attributes for Blocks" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Allows to add HTML attributes to Gutenberg blocks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin144 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25073142
CSS1001
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
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
Namespaces1
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin