71% x-builder

Code Review | WordPress Page Builder Plugin - X Builder

WordPress plugin WordPress Page Builder Plugin - X Builder scored 71% from 54 tests.

About plugin

  • Plugin page: x-builder
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.3
  • WordPress version: 5.9.2
  • First release: Aug 5, 2019
  • Latest release: Jan 13, 2022
  • Number of updates: 32
  • Update frequency: every 28.0 days
  • Top authors: stylemix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 10,585 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.47MB] [CPU: ▲503.35ms] 50% from 4 tests

Analyzing server-side resources used by WordPress Page Builder Plugin - X Builder
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,068.85ms on /wp-admin/admin.php?page=redux_demo&tab=4)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 503.35ms on /wp-admin/admin.php?page=redux_demo&tab=4)
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5361.70 ▲6.99
Dashboard /wp-admin5.35 ▲1.941,171.79 ▲1,127.47
Posts /wp-admin/edit.php5.31 ▲1.661,223.76 ▲1,159.72
Add New Post /wp-admin/post-new.php8.93 ▲1.951,136.75 ▼121.55
Media Library /wp-admin/upload.php5.03 ▲1.731,028.32 ▲1,000.47
Redux Framework /wp-admin/tools.php?page=redux-about4.941,090.95
Import / Export /wp-admin/admin.php?page=redux_demo&tab=55.542,136.40
General Settings /wp-admin/admin.php?page=redux_demo&tab=15.251,089.84
Options Object /wp-admin/admin.php?page=redux_demo&tab=45.251,068.85

Server storage [IO: ▲7.28MB] [DB: ▲0.06MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 636 new files
Database: no new tables, 3 new options
New WordPress options
redux_version_upgraded_from
x_builder_options-transients
x_builder_options

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Page Builder Plugin - X Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,089 ▲33516.31 ▲0.6310.00 ▲4.202.55 ▲0.36
Dashboard /wp-admin3,055 ▲2016.15 ▼0.00123.59 ▼13.36169.67 ▲5.94
Posts /wp-admin/edit.php2,783 ▲893.24 ▲0.0166.26 ▼3.52153.64 ▲7.64
Add New Post /wp-admin/post-new.php1,743 ▲8220.03 ▲3.52409.98 ▼85.49201.37 ▼12.72
Media Library /wp-admin/upload.php1,771 ▲765.48 ▼0.05148.28 ▲13.12207.59 ▲22.61
Redux Framework /wp-admin/tools.php?page=redux-about1,4134.05112.21213.13
Import / Export /wp-admin/admin.php?page=redux_demo&tab=51,6913.9286.44174.01
General Settings /wp-admin/admin.php?page=redux_demo&tab=11,7134.42106.04163.23
Options Object /wp-admin/admin.php?page=redux_demo&tab=41,6923.83100.35156.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 3 options
    • x_builder_options-transients
    • x_builder_options
    • redux_version_upgraded_from

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/x-builder/metaboxes/components/multiselect.php
    • > /wp-content/plugins/x-builder/templates/builder.php
    • > /wp-content/plugins/x-builder/x_builder/x_banner/subtitle.php
    • > /wp-content/plugins/x-builder/x_builder/x_banner/content.php
    • > /wp-content/plugins/x-builder/metaboxes/components/payments.php
    • > /wp-content/plugins/x-builder/metaboxes/components/color.php
    • > /wp-content/plugins/x-builder/metaboxes/components/datepicker.php
    • > /wp-content/plugins/x-builder/metaboxes/fields/not_exist.php
  • 269× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function stm_x_builder_get_params() in wp-content/plugins/x-builder/x_builder/x_categories_grid.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function stm_x_builder_get_params() in wp-content/plugins/x-builder/x_builder/x_column.php:10
    • > PHP Warning
      include(): Failed opening 'STM_X_BUILDER_DIR/metaboxes/components/color.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/x-builder/metaboxes/components_js/color.php on line 5
    • > PHP Warning
      include(): Failed opening 'STM_X_BUILDER_DIR/metaboxes/components/payments.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/x-builder/metaboxes/components_js/payments.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/x-builder/metaboxes/fields/iconpicker.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/x-builder/x-builder.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'STM_X_BUILDER_DIR/api/Endpoints.Class.php' (include_path='.:/usr/share/php') in wp-content/plugins/x-builder/api/main.php on line 3
    • > PHP Warning
      include(STM_X_BUILDER_DIR/metaboxes/components_js/typography.php): failed to open stream: No such file or directory in wp-content/plugins/x-builder/metaboxes/fields/typography.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Panel' not found in wp-content/plugins/x-builder/ReduxFramework/ReduxCore/inc/extensions/customizer/inc/customizer_panel.php:11
    • > PHP Warning
      include(STM_X_BUILDER_DIR/metaboxes/components_js/image.php): failed to open stream: No such file or directory in wp-content/plugins/x-builder/metaboxes/fields/image.php on line 11

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)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=redux_demo&tab=5
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=redux_demo&tab=5 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=45ddc1e1bf&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D45ddc1e1bf%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=redux_demo&tab=1
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=redux_demo&tab=1 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=45ddc1e1bf&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D45ddc1e1bf%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #5 (visual editor), #6 (editor), #7 (landing page), #8 (drag-and-drop)
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

x-builder/x-builder.php 92% from 13 tests

The main PHP file in "WordPress Page Builder Plugin - X Builder" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 231 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin48,012 lines of code in 526 files:
LanguageFilesBlank linesComment linesLines of code
PHP2615,9577,81228,391
JavaScript1422,8782,25214,588
Markdown458601,756
SVG4001,172
JSON21840930
CSS1031667798
Bourne Shell43150122
XML310111
HTML17060
LESS10053
YAML102231

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity32.47
▷ Minimum class complexity1.00
▷ Maximum class complexity883.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes119
▷ Abstract classes00.00%
▷ Concrete classes119100.00%
▷ Final classes00.00%
Methods777
▷ Static methods18623.94%
▷ Public methods55871.81%
▷ Protected methods15319.69%
▷ Private methods668.49%
Functions112
▷ Named functions11199.11%
▷ Anonymous functions10.89%
Constants76
▷ Global constants1013.16%
▷ Class constants6686.84%
▷ Public constants66100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
36 compressed PNG files occupy 0.19MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ReduxFramework/sample/patterns/wild_flowers.png46.05KB49.23KB0.00%
ReduxFramework/ReduxCore/assets/img/toggle_tabs.png0.35KB0.35KB0.00%
ReduxFramework/ReduxCore/inc/fields/spinner/arrow_left.png0.15KB0.12KB▼ 16.67%
ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png0.12KB0.16KB0.00%
ReduxFramework/sample/patterns/triangular.png0.21KB0.22KB0.00%