93% tabs-for-visual-composer

Code Review | Tabs For WPBakery Page Builder (formerly Visual Composer)

WordPress plugin Tabs For WPBakery Page Builder (formerly Visual Composer) scored 93% from 54 tests.

About plugin

  • Plugin page: tabs-for-visual-c...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 5.8.1
  • First release: Nov 24, 2017
  • Latest release: Feb 6, 2021
  • Number of updates: 16
  • Update frequency: every 73.6 days
  • Top authors: Labibahmed42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 10,884 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.34ms] Passed 4 tests

Analyzing server-side resources used by Tabs For WPBakery Page Builder (formerly Visual Composer)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1539.56 ▲16.60
Dashboard /wp-admin3.10 ▲0.0447.44 ▲2.81
Posts /wp-admin/edit.php3.15 ▲0.0444.29 ▼0.45
Add New Post /wp-admin/post-new.php5.45 ▲0.0287.18 ▼570.31
Media Library /wp-admin/upload.php3.04 ▲0.0432.21 ▲2.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Tabs For WPBakery Page Builder (formerly Visual Composer)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,698 ▲10215.87 ▲0.307.23 ▼1.6444.36 ▼1.07
Dashboard /wp-admin3,008 ▲785.95 ▼0.11138.81 ▼18.66105.32 ▼15.78
Posts /wp-admin/edit.php2,758 ▲192.69 ▲0.0266.43 ▲0.5993.01 ▲7.83
Add New Post /wp-admin/post-new.php1,512 ▼17118.57 ▼0.15364.82 ▼42.57101.10 ▼19.90
Media Library /wp-admin/upload.php1,826 ▲195.01 ▼0.03149.04 ▼0.30113.11 ▼7.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% 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 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tabs-for-visual-composer/plugin.class.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

tabs-for-visual-composer/index.php 85% from 13 tests

This is the main PHP file of "Tabs For WPBakery Page Builder (formerly Visual Composer)" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to 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: Name the main plugin file the same as the plugin slug ("tabs-for-visual-composer.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected10,819 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS65667710,581
PHP25321201
JavaScript27624
SVG11013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/tabs-icon.png2.77KB1.36KB▼ 51.09%
admin/vc-extend.png50.50KB20.84KB▼ 58.72%