72% brix-page-builder

Code Review | Brix: WordPress page builder

WordPress plugin Brix: WordPress page builder scored72%from 54 tests.

About plugin

  • Plugin page: brix-page-builder
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.0
  • WordPress version: 6.3.1
  • First release: Nov 15, 2016
  • Latest release: Aug 28, 2020
  • Number of updates: 81
  • Update frequency: every 17.1 days
  • Top authors: evolvesnc (66.67%)andg (32.1%)simo_m (3.7%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /8,249 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.35MB] [CPU: ▼23.23ms] Passed 4 tests

Analyzing server-side resources used by Brix: WordPress page builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5043.09 ▲4.41
Dashboard /wp-admin3.71 ▲0.3735.00 ▼31.80
Posts /wp-admin/edit.php3.85 ▲0.5039.96 ▼10.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0472.29 ▼46.73
Media Library /wp-admin/upload.php3.70 ▲0.4835.20 ▼3.75
Documentation /wp-admin/admin.php?page=brix_docs3.7032.76
Configuration /wp-admin/admin.php?page=brix3.7044.20
Upgrade to premium /wp-admin/admin.php?page=brix_pro3.7032.83

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 1,082 new files
Database: no new tables, 8 new options
New WordPress options
brix_installed
db_upgraded
can_compress_scripts
widget_theysaidso_widget
brix_twentytwentyone
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Brix: WordPress page builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,151 ▲39017.65 ▲3.101.99 ▲0.4641.00 ▲0.42
Dashboard /wp-admin2,501 ▲3248.27 ▲2.60163.34 ▲71.1284.46 ▲42.95
Posts /wp-admin/edit.php2,600 ▲5006.03 ▲4.0182.24 ▲41.0986.04 ▲46.86
Add New Post /wp-admin/post-new.php1,679 ▲14424.17 ▲6.01667.35 ▲26.78163.29 ▲92.42
Media Library /wp-admin/upload.php1,811 ▲4116.42 ▲2.22112.81 ▲4.82114.22 ▲65.11
Documentation /wp-admin/admin.php?page=brix_docs1,81715.84344.40119.74
Configuration /wp-admin/admin.php?page=brix1,6555.1778.1189.37
Upgrade to premium /wp-admin/admin.php?page=brix_pro2,18116.63307.88112.38

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • brix_twentytwentyone
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brix_pro
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brix
    • > Notice in wp-content/plugins/brix-page-builder/fw/classes/core/brix_field.php+868
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 112× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/brix-page-builder/blocks/widget/widgets/custom_menu.php
    • > /wp-content/plugins/brix-page-builder/fw/classes/core/fields/brix_icon_field.php
    • > /wp-content/plugins/brix-page-builder/blocks/widget/widgets/rss.php
    • > /wp-content/plugins/brix-page-builder/blocks/widget/widget_block.php
    • > /wp-content/plugins/brix-page-builder/fw/classes/core/brix_field.php
    • > /wp-content/plugins/brix-page-builder/fw/classes/core/fields/brix_color_field.php
    • > /wp-content/plugins/brix-page-builder/includes/spacing.php
    • > /wp-content/plugins/brix-page-builder/fw/classes/core/controllers/brix_admincontroller.php
    • > /wp-content/plugins/brix-page-builder/fw/classes/core/fields_containers/brix_theme_page.php
    • > /wp-content/plugins/brix-page-builder/fw/classes/updater/brix_updater_old.php
  • 85× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/brix-page-builder/includes/install/steps/step-0-intro.php:3
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/brix-page-builder/fw/templates/fields/textarea.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function config() on null in wp-content/plugins/brix-page-builder/fw/templates/fields/color.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function brix_column_classes() in wp-content/plugins/brix-page-builder/templates/frontend/column.php:4
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/brix-page-builder/fw/templates/fields/date.php on line 6
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/brix-page-builder/templates/fields/accordion.php on line 2
    • > PHP Warning
      A non-numeric value encountered in wp-content/plugins/brix-page-builder/templates/admin/column.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function config() on null in wp-content/plugins/brix-page-builder/fw/templates/fields/number.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function value() on null in wp-content/plugins/brix-page-builder/templates/fields/brix_spacing.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BrixBuilderBlock' not found in wp-content/plugins/brix-page-builder/blocks/divider/divider_block.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

brix-page-builder/brix.php 85% from 13 tests

Analyzing the main PHP file in "Brix: WordPress page builder" version 1.5.7
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("brix-page-builder.php" instead of "brix.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected58,548 lines of code in 1,018 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript736,2155,33733,297
PHP1754,7877,19418,617
Sass401,0145844,398
SVG6934714984
JSON200742
CSS31946459
Markdown416051

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.16
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes77
▷ Abstract classes67.79%
▷ Concrete classes7192.21%
▷ Final classes00.00%
Methods391
▷ Static methods133.32%
▷ Public methods27670.59%
▷ Protected methods6917.65%
▷ Private methods4611.76%
Functions408
▷ Named functions408100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants3797.37%
▷ Class constants12.63%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 0.91MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lite/i/title.png10.60KB6.80KB▼ 35.81%
assets/admin/css/i/jquery.minicolors.png66.66KB34.31KB▼ 48.52%
lite/i/icn-linea.png32.93KB22.31KB▼ 32.25%
lite/i/bg.png3.04KB3.89KB0.00%
lite/i/btn.png2.48KB2.40KB▼ 3.19%