77% rexpansive-page-builder

Code Review | Rexpansive Builder

WordPress plugin Rexpansive Builder scored77%from 54 tests.

About plugin

  • Plugin page: rexpansive-page-b...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2017
  • Latest release: Sep 11, 2023
  • Number of updates: 54
  • Update frequency: every 50.4 days
  • Top authors: neweb_agency (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,949 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.63MB] [CPU: ▲32.87ms] 75% from 4 tests

Analyzing server-side resources used by Rexpansive Builder
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.63MB on /wp-admin/plugins.php?page=tgmpa-install-plugins)
PageMemory (MB)CPU Time (ms)
Home /8.86 ▲5.4070.28 ▲29.34
Dashboard /wp-admin9.01 ▲5.6792.89 ▲28.21
Posts /wp-admin/edit.php9.08 ▲5.7278.77 ▲29.04
Add New Post /wp-admin/post-new.php11.69 ▲5.80139.59 ▲44.89
Media Library /wp-admin/upload.php8.97 ▲5.7484.51 ▲50.00
RexSlider /wp-admin/edit.php?post_type=rex_slider8.9372.24
Settings /wp-admin/admin.php?page=rexpansive-builder8.8973.90
Contact Forms /wp-admin/admin.php?page=rxcf7-list9.0983.96
RexModel /wp-admin/edit.php?post_type=rex_model8.9370.92
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins8.9268.61

Server storage [IO: ▲36.14MB] [DB: ▲0.05MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Total filesystem usage must be limited to 25MB (currently using 36.14MB)
Filesystem: 1,162 new files
Database: no new tables, 19 new options
New WordPress options
_rex_button_BJok_html
_rex_button_VocS_html
_rex_button_2UKt_css
widget_theysaidso_widget
rexpansive-builder-content-installed
_rex_button_6W4D_css
can_compress_scripts
_rex_button_VocS_css
rexpansive-builder_options
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Rexpansive Builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.33 ▼1.254.05 ▲2.4142.13 ▼2.76
Dashboard /wp-admin2,286 ▲985.94 ▲1.08100.08 ▼3.6480.60 ▲38.39
Posts /wp-admin/edit.php2,193 ▲1042.06 ▲0.0038.81 ▼2.5538.47 ▲1.53
Add New Post /wp-admin/post-new.php10,785 ▲9,27128.09 ▲10.201,321.78 ▲623.16219.76 ▲173.46
Media Library /wp-admin/upload.php2,101 ▲7168.38 ▲4.16216.41 ▲117.3490.01 ▲46.55
RexSlider /wp-admin/edit.php?post_type=rex_slider1,1652.0035.0337.95
Settings /wp-admin/admin.php?page=rexpansive-builder1,3683.8380.1149.71
Contact Forms /wp-admin/admin.php?page=rxcf7-list5,40111.65271.39112.15
RexModel /wp-admin/edit.php?post_type=rex_model1,1571.9836.4937.42
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0482.1830.5434.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 19 options
    • _rex_button_VocS_html
    • _rex_button_2UKt_css
    • _rex_button_2UKt_html
    • _rex_button_6W4D_html
    • acf_version
    • theysaidso_admin_options
    • _rex_buttons_ids
    • widget_recent-comments
    • _rex_button_VocS_css
    • _rex_button_BJok_html
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rexpansive-page-builder/public/partials/js-templates/rexlive-block-tools-floating.php
    • > /wp-content/plugins/rexpansive-page-builder/public/partials/rexbuilder-public-display.php
    • > /wp-content/plugins/rexpansive-page-builder/admin/partials/rexlive-modals-top-arrow.php
    • > /wp-content/plugins/rexpansive-page-builder/admin/partials/rexlive-modals-bottom-arrow.php
    • > /wp-content/plugins/rexpansive-page-builder/public/partials/rexlive-drag-handlers.php
    • > /wp-content/plugins/rexpansive-page-builder/public/templates/rexbuilder-vertical_points-template.php
  • 108× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/admin/views/settings-addons.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/fields/class-acf-field-true_false.php:5
    • > PHP Notice
      Undefined variable: group_id in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/admin/views/html-location-group.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/fields/class-acf-field-button-group.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/local-fields.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/acf-repeater/includes/5-0/acf-repeater-field.php:5
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/admin/views/html-admin-tools.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/acf-repeater/includes/5-7/acf-repeater-field.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/fields/class-acf-field-group.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rexpansive-page-builder/admin/lib/acf/advanced-custom-fields/includes/admin/admin-field-groups.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: content builder, theme, composer, page composer, drag and drop...

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

The main PHP script in "Rexpansive Builder" version 2.2.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rexpansive-page-builder.php" instead of "rexpansive-builder.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin282,029 lines of code in 1,022 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61732,93949,876174,090
PO File4623,44938,31650,713
PHP27515,95224,34439,028
CSS522,45073515,663
SVG2018131,096
Markdown51960792
HTML15618441
JSON400173
Sass14420
XML10013

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 203)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity24.64
▷ Minimum class complexity1.00
▷ Maximum class complexity558.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity203.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes146
▷ Abstract classes21.37%
▷ Concrete classes14498.63%
▷ Final classes00.00%
Methods1,135
▷ Static methods696.08%
▷ Public methods1,05492.86%
▷ Protected methods484.23%
▷ Private methods332.91%
Functions411
▷ Named functions40999.51%
▷ Anonymous functions20.49%
Constants25
▷ Global constants2288.00%
▷ Class constants312.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
33 PNG files occupy 0.52MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/move-white.png0.63KB0.31KB▼ 51.16%
public/jquery.mb.YTPlayer/css/images/raster@2x.png2.66KB0.10KB▼ 96.07%
admin/lib/acf/advanced-custom-fields/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
public/jquery.mb.YTPlayer/css/images/raster_dot.png0.08KB0.10KB0.00%
admin/js/builderlive/Photoswipe/default-skin/default-skin.png0.53KB0.72KB0.00%