72% post-and-page-builder

Code Review | Post and Page Builder by BoldGrid - Visual Drag and Drop Editor

WordPress plugin Post and Page Builder by BoldGrid - Visual Drag and Drop Editor scored72%from 54 tests.

About plugin

  • Plugin page: post-and-page-bui...
  • Plugin version: 1.25.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 16, 2017
  • Latest release: Oct 24, 2023
  • Number of updates: 550
  • Update frequency: every 3.9 days
  • Top authors: boldgrid (69.82%)rramo012 (29.27%)

Code review

54 tests

User reviews

134 reviews

Install metrics

90,000+ active /1,274,771 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲2.87MB] [CPU: ▲22.25ms] 75% from 4 tests

Analyzing server-side resources used by Post and Page Builder by BoldGrid - Visual Drag and Drop Editor
Please take the time to fix the following items
  • RAM: Total memory usage should be kept under 10MB (currently 10.56MB on /wp-admin/post-new.php?post_type=bg_block)
PageMemory (MB)CPU Time (ms)
Home /9.64 ▲6.1860.17 ▲20.33
Dashboard /wp-admin5.86 ▲2.553,272.34 ▲3,221.93
Posts /wp-admin/edit.php5.51 ▲2.1563.03 ▲14.91
Add New Post /wp-admin/post-new.php10.59 ▲4.69117.49 ▲27.34
Media Library /wp-admin/upload.php5.32 ▲2.0960.77 ▲26.40
Settings /wp-admin/edit.php?post_type=bg_block&page=bgppb-settings5.3549.81
Block Library /wp-admin/edit.php?post_type=bg_block5.3852.87
Add New Block /wp-admin/post-new.php?post_type=bg_block10.56101.64

Server storage [IO: ▲19.45MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 905 new files
Database: no new tables, 13 new options
New WordPress options
widget_boldgrid_component_page_title
boldgrid_settings
widget_boldgrid_component_menu
boldgrid_editor
widget_boldgrid_component_site_description
widget_theysaidso_widget
widget_recent-posts
widget_boldgrid_component_site_title
widget_boldgrid_component_logo
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Post and Page Builder by BoldGrid - Visual Drag and Drop Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,362 ▲60113.97 ▼0.6614.03 ▲12.3237.52 ▼6.53
Dashboard /wp-admin2,537 ▲3574.78 ▼0.9887.95 ▼14.1386.88 ▲42.80
Posts /wp-admin/edit.php2,348 ▲2482.18 ▲0.2238.10 ▲3.3233.86 ▼4.73
Add New Post /wp-admin/post-new.php7,685 ▲6,15417.80 ▼5.25484.61 ▼196.39186.17 ▲129.33
Media Library /wp-admin/upload.php1,647 ▲2504.26 ▲0.0497.18 ▲1.6345.19 ▲2.62
Settings /wp-admin/edit.php?post_type=bg_block&page=bgppb-settings1,6242.5540.3336.51
BoldGrid Connect /wp-admin/boldgrid-connect.php260.420.0910.80
Block Library /wp-admin/edit.php?post_type=bg_block1,3172.1534.3931.80
Add New Block /wp-admin/post-new.php?post_type=bg_block6,23214.74492.63130.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_boldgrid_component_site_description
    • widget_boldgrid_component_menu
    • boldgrid_editor
    • widget_boldgrid_component_page_title
    • widget_recent-posts
    • db_upgraded
    • boldgrid_settings
    • widget_boldgrid_component_site_title
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ...

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 16× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/post-and-page-builder/includes/template/icon.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/panel.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/tables.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/section-dividers.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/button.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/color.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/image-filter.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/background-legacy.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/generic-controls.php
    • > /wp-content/plugins/post-and-page-builder/includes/template/gridblock.php
  • 60× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Boldgrid\\Library\\Library\\Ui\\Card' not found in wp-content/plugins/post-and-page-builder/includes/View/Card/Premium.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-and-page-builder/includes/Widget/Logo.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/post-and-page-builder/vendor/boldgrid/library/src/Library/Views/EnvatoFreeKey.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Boldgrid\\Library\\Library\\Ui\\Feature' not found in wp-content/plugins/post-and-page-builder/includes/View/Feature/Boldgrid.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/post-and-page-builder/includes/template/page/body.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/post-and-page-builder/vendor/boldgrid/library/tests/Library/Util/test-plugin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/post-and-page-builder/vendor/boldgrid/library/src/Library/Views/ConnectionIssue.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/post-and-page-builder/includes/template/page/base.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/post-and-page-builder/vendor/boldgrid/library/tests/Library/Library/test-rating-prompt.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_type() in wp-content/plugins/post-and-page-builder/includes/template/page/entry-footer.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/boldgrid-connect.php
    • > Network (severe)
    wp-admin/boldgrid-connect.php - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bg_block
    • > Network (severe)
    ?p=10&bg_preview_page=1&bg_post_id=10 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: drag and drop, boldgrid, editor, tinymce, landing page...

post-and-page-builder/post-and-page-builder.php 77% from 13 tests

The main PHP script in "Post and Page Builder by BoldGrid - Visual Drag and Drop Editor" version 1.25.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 175 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected93,178 lines of code in 594 files:
LanguageFilesBlank linesComment linesLines of code
JSON1125031,475
JavaScript1644,6317,77127,716
PHP1872,99010,21012,793
CSS341,96456412,373
Sass80994746,094
SVG81131,352
HTML3200789
PO File180105247
Markdown11530232
Bourne Shell115759
YAML181129
XML10019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.51
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces23
Interfaces1
Traits0
Classes131
▷ Abstract classes10.76%
▷ Concrete classes13099.24%
▷ Final classes00.00%
Methods834
▷ Static methods13616.31%
▷ Public methods76992.21%
▷ Protected methods344.08%
▷ Private methods313.72%
Functions33
▷ Named functions721.21%
▷ Anonymous functions2678.79%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
270 compressed PNG files occupy 5.64MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/patterns/subtle-zebra-3d.png0.37KB0.41KB0.00%
assets/image/patterns/dark-dot.png0.08KB0.11KB0.00%
assets/image/patterns/knitted-netting.png0.19KB0.26KB0.00%
assets/image/patterns/light-gray.png0.43KB0.47KB0.00%
assets/image/patterns/dark-circles.png0.14KB0.21KB0.00%