84% attire-blocks

Code Review | Gutenberg Blocks and Page Layouts - Attire Blocks

WordPress plugin Gutenberg Blocks and Page Layouts - Attire Blocks scored84%from 54 tests.

About plugin

  • Plugin page: attire-blocks
  • Plugin version: 1.9.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Nov 16, 2023
  • Number of updates: 85
  • Update frequency: every 14.2 days
  • Top authors: Shafayat Alam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /16,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼2.42ms] Passed 4 tests

Analyzing server-side resources used by Gutenberg Blocks and Page Layouts - Attire Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2538.34 ▼5.73
Dashboard /wp-admin3.54 ▲0.2343.80 ▼5.75
Posts /wp-admin/edit.php3.65 ▲0.2949.42 ▲0.62
Add New Post /wp-admin/post-new.php6.22 ▲0.3496.47 ▲1.19
Media Library /wp-admin/upload.php3.46 ▲0.2341.86 ▲9.87

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 66 new files
Database: no new tables, 7 new options
New WordPress options
__wpdm_enc_key
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gutenberg Blocks and Page Layouts - Attire Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲27413.57 ▼0.7812.11 ▲10.0342.81 ▼9.88
Dashboard /wp-admin2,346 ▲1695.61 ▼0.0592.16 ▼2.5041.92 ▼0.64
Posts /wp-admin/edit.php2,247 ▲1472.00 ▼0.0240.40 ▲4.5635.69 ▼1.28
Add New Post /wp-admin/post-new.php6,662 ▲5,13535.10 ▲12.301,111.11 ▲417.3047.21 ▼3.33
Media Library /wp-admin/upload.php1,550 ▲1474.25 ▲0.1098.26 ▲0.7043.27 ▲1.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • __wpdm_enc_key
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Attire\\Blocks\\blocks\\voting\\add_action() in wp-content/plugins/attire-blocks/blocks/dynamic/voting/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Attire\\Blocks\\blocks\\post_carousel\\add_action() in wp-content/plugins/attire-blocks/blocks/dynamic/post-carousel/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Attire\\Blocks\\blocks\\post_grid\\add_action() in wp-content/plugins/attire-blocks/blocks/dynamic/post-grid/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Attire\\Blocks\\blocks\\product_categories\\add_action() in wp-content/plugins/attire-blocks/blocks/dynamic/product-category/index.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: wordpress blocks, page builder, blocks, gutenberg, attire blocks...

attire-blocks/attire-blocks.php 92% from 13 tests

The main PHP script in "Gutenberg Blocks and Page Layouts - Attire Blocks" version 1.9.2 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)

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
Success! There were no dangerous files found in this plugin14,992 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
SVG50139,315
PHP205604553,699
JavaScript14159571,031
PO File1438630914
CSS701033

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity25.64
▷ Minimum class complexity3.00
▷ Maximum class complexity74.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods90
▷ Static methods4651.11%
▷ Public methods8695.56%
▷ Protected methods33.33%
▷ Private methods11.11%
Functions66
▷ Named functions5380.30%
▷ Anonymous functions1319.70%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/static/images/atbs_icon.png1.70KB1.71KB0.00%