84% ht-blocks

Code Review | HT Blocks - Absolute Gutenberg Blocks

WordPress plugin HT Blocks - Absolute Gutenberg Blocks scored84%from 54 tests.

About plugin

  • Plugin page: ht-blocks
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2018
  • Latest release: Apr 29, 2019
  • Number of updates: 12
  • Update frequency: every 18.2 days
  • Top authors: devitemsllc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.16ms] Passed 4 tests

Server-side resources used by HT Blocks - Absolute Gutenberg Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.03 ▼1.98
Dashboard /wp-admin3.39 ▲0.0946.00 ▼4.52
Posts /wp-admin/edit.php3.44 ▲0.0947.89 ▼4.79
Add New Post /wp-admin/post-new.php6.00 ▲0.12101.36 ▼9.33
Media Library /wp-admin/upload.php3.32 ▲0.0940.53 ▲3.62
All Accordions /wp-admin/edit.php?post_type=wphash_accordion3.3642.53
Categories /wp-admin/edit-tags.php?taxonomy=accordion_cat&post_type=wphash_accordion3.3136.33
Add New Accordion /wp-admin/post-new.php?post_type=wphash_accordion3.4452.97

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for HT Blocks - Absolute Gutenberg Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲17914.02 ▼0.287.90 ▲6.2841.36 ▼0.80
Dashboard /wp-admin2,249 ▲464.88 ▼0.05105.58 ▼5.7343.55 ▲3.57
Posts /wp-admin/edit.php2,134 ▲342.05 ▲0.0335.54 ▼4.8530.75 ▼5.18
Add New Post /wp-admin/post-new.php1,573 ▲4223.99 ▲0.94640.07 ▼74.5733.99 ▼23.18
Media Library /wp-admin/upload.php1,431 ▲344.15 ▼0.06113.09 ▼13.6848.07 ▼1.80
All Accordions /wp-admin/edit.php?post_type=wphash_accordion1,1091.9332.9730.07
Categories /wp-admin/edit-tags.php?taxonomy=accordion_cat&post_type=wphash_accordion1,3082.1429.5928.22
Add New Accordion /wp-admin/post-new.php?post_type=wphash_accordion2,2957.60200.0963.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ht-blocks/src/testimonial/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ht-blocks/src/accordion/index.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: guten blocks, absolute gutenberg blocks, blocks for gutenberg, gutenberg blocks, gutenberg

ht-blocks/plugin.php 85% from 13 tests

"HT Blocks - Absolute Gutenberg Blocks" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ht-blocks.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin30,855 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS66,1531,67827,398
SVG1002,671
JavaScript4127393509
PHP45144277

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/assets/img/icon1.png2.39KB1.55KB▼ 35.40%
dist/assets/img/icon2.png2.85KB1.98KB▼ 30.53%
dist/assets/img/pricing-ribon.png1.72KB1.72KB0.00%
dist/assets/img/icon3.png2.31KB1.56KB▼ 32.52%
dist/assets/img/pricebg1.png14.34KB9.43KB▼ 34.25%