87% templates-and-addons-for-wpbakery-page-builder

Code Review | Business Template Blocks for WPBakery (Visual Composer) Page Builder

WordPress plugin Business Template Blocks for WPBakery (Visual Composer) Page Builder scored 87% from 53 tests.

About plugin

  • Plugin page: templates-and-add...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 5.8.1
  • First release: Nov 6, 2018
  • Latest release: Mar 20, 2021
  • Number of updates: 43
  • Update frequency: every 20.1 days
  • Top authors: themebon (100%)

Code review

53 tests

User reviews

6 reviews

Install metrics

200+ active / 12,556 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼263.75ms] Passed 4 tests

An overview of server-side resources used by Business Template Blocks for WPBakery (Visual Composer) Page Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1133.76 ▲13.26
Dashboard /wp-admin3.06 ▲0.0044.09 ▼4.45
Posts /wp-admin/edit.php3.11 ▲0.0041.01 ▼4.79
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.14 ▼1,035.21
Media Library /wp-admin/upload.php3.00 ▼0.0129.51 ▼10.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 170 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Business Template Blocks for WPBakery (Visual Composer) Page Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲6816.23 ▲0.797.78 ▲0.4845.44 ▼4.12
Dashboard /wp-admin2,934 ▲846.12 ▲0.11141.23 ▲8.16105.16 ▼1.43
Posts /wp-admin/edit.php2,706 ▼02.70 ▲0.0164.74 ▼1.1690.57 ▼10.20
Add New Post /wp-admin/post-new.php1,851 ▲19817.75 ▼0.94361.94 ▼7.83101.77 ▼8.34
Media Library /wp-admin/upload.php1,769 ▼35.08 ▲0.05155.31 ▼4.33109.77 ▼9.51

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
Uninstall script ran successfully

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/templates-addon-vc.php
  • 45× 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 vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/service-v3.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/latest-post-grid-v2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/contact-section-v1.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/parallax-section-v2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/call-to-action-v1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/team-member-v1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/service-v1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/pricing-table-v2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_add_shortcode_param() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/admin/params/slider/slider-params.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/templates-and-addons-for-wpbakery-page-builder/modules/service-v2.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can look at the official readme.txt

templates-and-addons-for-wpbakery-page-builder/templates-addon-vc.php 85% from 13 tests

The main PHP file in "Business Template Blocks for WPBakery (Visual Composer) Page Builder" ver. 1.3.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:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("templates-and-addons-for-wpbakery-page-builder.php" instead of "templates-addon-vc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected56,372 lines of code in 141 files:
LanguageFilesBlank linesComment linesLines of code
JSON20017,050
CSS171,83551915,068
PHP931,7891,13410,632
JavaScript131,9981,8217,980
SVG1002,671
Sass634102,089
PO File7306334705
Markdown2240177

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity13.43
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity5.34
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes00.00%
Methods106
▷ Static methods65.66%
▷ Public methods10498.11%
▷ Protected methods00.00%
▷ Private methods21.89%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/framework/assets/images/chosen-sprite@2x.png0.72KB0.83KB0.00%
admin/img/hover_effects_icon.png2.06KB1.21KB▼ 41.43%
inc/framework/assets/images/chosen-sprite.png0.53KB0.88KB0.00%
inc/framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
admin/img/tavc-icon.png38.64KB16.72KB▼ 56.72%