83% hayyabuild

Code Review | HayyaBuild - The Most Advanced Gutenberg Blocks

WordPress plugin HayyaBuild - The Most Advanced Gutenberg Blocks scored 83% from 54 tests.

About plugin

  • Plugin page: hayyabuild
  • Plugin version: 3.0
  • PHP compatiblity: 5.6.40+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.8.1
  • First release: Oct 2, 2017
  • Latest release: Feb 1, 2022
  • Number of updates: 83
  • Update frequency: every 19.1 days
  • Top authors: zintathemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 10,586 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼234.42ms] Passed 4 tests

Server-side resources used by HayyaBuild - The Most Advanced Gutenberg Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.14 ▲0.3130.95 ▲3.88
Dashboard /wp-admin3.50 ▲0.4440.49 ▼1.30
Posts /wp-admin/edit.php3.55 ▲0.4440.10 ▲3.55
Add New Post /wp-admin/post-new.php5.99 ▲0.5579.71 ▼943.79
Media Library /wp-admin/upload.php3.38 ▲0.3835.96 ▲6.35
New Header /wp-admin/post-new.php?post_type=hayyabuild&type=header5.9975.69
Help /wp-admin/edit.php?post_type=hayyabuild&page=hayyabuild_help3.3824.30
New Footer /wp-admin/post-new.php?post_type=hayyabuild&type=footer5.9982.38
New Content /wp-admin/post-new.php?post_type=hayyabuild&type=content5.9972.01
HayyaBuild /wp-admin/edit.php?post_type=hayyabuild3.4930.02

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 205 new files
Database: no new tables, 1 new option
New WordPress options
hayyabuild_version

Browser metrics Passed 4 tests

An overview of browser requirements for HayyaBuild - The Most Advanced Gutenberg Blocks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,749 ▲14718.28 ▲2.3411.93 ▲6.3977.45 ▼0.03
Dashboard /wp-admin2,998 ▲1068.34 ▲2.02159.34 ▲27.94185.15 ▲14.39
Posts /wp-admin/edit.php2,775 ▲325.32 ▲2.08113.76 ▲49.40154.50 ▲16.90
Add New Post /wp-admin/post-new.php2,416 ▼1,34921.09 ▲2.03473.22 ▲21.64170.04 ▲5.45
Media Library /wp-admin/upload.php1,796 ▲447.27 ▲1.79207.81 ▲60.31263.43 ▲76.16
New Header /wp-admin/post-new.php?post_type=hayyabuild&type=header6,38617.94520.58184.81
Help /wp-admin/edit.php?post_type=hayyabuild&page=hayyabuild_help1,6055.49118.53167.50
New Footer /wp-admin/post-new.php?post_type=hayyabuild&type=footer6,40218.66362.49178.60
New Content /wp-admin/post-new.php?post_type=hayyabuild&type=content6,38220.04385.67184.92
HayyaBuild /wp-admin/edit.php?post_type=hayyabuild1,6115.2585.43145.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/hayyabuild/hayyabuild.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/hayyabuild/public/templates/404.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=hayyabuild&type=content
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=7ed7fe32dad771c4e0af4f56539ff156+1:40463
    Block validation: Expected attribute `%s` of value `%s`, saw `%s`." "style" "height:100px" "height:5px
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=hayyabuild&type=content
    • > Console-api (severe) in wp-includes/js/dist/blocks.min.js?ver=7ed7fe32dad771c4e0af4f56539ff156+1:40463
    Block validation: Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s" "core/spacer" Object "\u003Cdiv style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\">\u003C/div>" "\u003Cdiv style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\">\u003C/div>
    • > GET request to /wp-admin/edit.php?post_type=hayyabuild&page=hayyabuild_help
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=hayyabuild&type=header - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808
    • > GET request to /wp-admin/post-new.php?post_type=hayyabuild&type=content
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=hayyabuild&type=footer - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808
    • > GET request to /wp-admin/edit.php?post_type=hayyabuild
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=hayyabuild&type=content - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808

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
9 plugin tags: editor blocks, editor block, blocks, gutenberg blocks, block...

hayyabuild/hayyabuild.php Passed 13 tests

Analyzing the main PHP file in "HayyaBuild - The Most Advanced Gutenberg Blocks" version 3.0
105 characters long description:
WordPress headers, Pages and Footers builder plugin, It's comes with the most advanced Gutenberg blocks.

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
Good job! No executable or dangerous file extensions detected44,574 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript96,3037,93220,545
SVG13102210,123
CSS233,6991329,059
PHP305481,6022,457
JSON4116602,390

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.61
Average class complexity21.04
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes13.70%
Methods156
▷ Static methods6441.03%
▷ Public methods13687.18%
▷ Protected methods10.64%
▷ Private methods1912.18%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
50 PNG files occupy 3.17MB with 1.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/data/footer05.png13.79KB7.85KB▼ 43.10%
public/assets/images/simple-800x600.png11.14KB4.33KB▼ 61.12%
includes/data/footer10.png149.38KB69.91KB▼ 53.20%
includes/data/header05.png314.29KB192.92KB▼ 38.62%
includes/data/footer02.png25.87KB16.02KB▼ 38.06%