78% mega-addons-for-visual-composer

Code Review | Mega Addons For WPBakery Page Builder

WordPress plugin Mega Addons For WPBakery Page Builder scored 78% from 54 tests.

About plugin

  • Plugin page: mega-addons-for-v...
  • Plugin version: 4.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2017
  • Latest release: May 3, 2023
  • Number of updates: 217
  • Update frequency: every 10.4 days
  • Top authors: nasir179125 (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

50,000+ active / 761,302 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.02MB] [CPU: ▼5.03ms] Passed 4 tests

Analyzing server-side resources used by Mega Addons For WPBakery Page Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.65 ▲6.68
Dashboard /wp-admin3.32 ▲0.0244.52 ▼5.62
Posts /wp-admin/edit.php3.37 ▲0.0248.39 ▼2.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.56 ▼14.68
Media Library /wp-admin/upload.php3.24 ▲0.0135.67 ▲2.79

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 234 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
vc_save_data
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mega Addons For WPBakery Page Builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8413.22 ▼1.361.70 ▼0.1339.24 ▼7.40
Dashboard /wp-admin2,244 ▲564.88 ▼1.0298.50 ▼12.0240.23 ▼1.28
Posts /wp-admin/edit.php2,127 ▲382.03 ▲0.0241.10 ▼1.0935.38 ▼2.83
Add New Post /wp-admin/post-new.php1,555 ▲2223.29 ▲0.18659.58 ▲11.6657.62 ▲1.48
Media Library /wp-admin/upload.php1,423 ▲354.23 ▲0.0294.75 ▼3.3540.81 ▼3.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • vc_save_data
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
  • 36× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/statcounter.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/accordion_father.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/advanceprice.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/tm_carousel_son.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style2.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/countdown.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/headings.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/creativelink.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/timeline_son.php
    • > /wp-content/plugins/mega-addons-for-visual-composer/render/image_swap.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mega-addons-for-visual-composer/render/price-table/price1.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mega-addons-for-visual-composer/render/price-table/price4.php:1
    • > PHP Notice
      Undefined variable: member_clr in wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style4.php on line 2
    • > PHP Notice
      Undefined variable: member_visibility in wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style1.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style8.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style4.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mega-addons-for-visual-composer/includes/settings.php:3
    • > PHP Notice
      Undefined variable: member_visibility in wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style4.php on line 5
    • > PHP Notice
      Undefined variable: member_visibility in wp-content/plugins/mega-addons-for-visual-composer/render/team-profile/style3.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mega-addons-for-visual-composer/render/price-table/price2.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
You can take inspiration from this readme.txt

mega-addons-for-visual-composer/index.php 92% from 13 tests

"Mega Addons For WPBakery Page Builder" version 4.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mega-addons-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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin55,640 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
CSS404,00462122,495
PHP4790821810,910
SVG61129,050
Sass18507344,669
LESS18504554,627
JavaScript251,3021,0983,889

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods1424.56%
▷ Protected methods4375.44%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
57 PNG files occupy 0.22MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/filtergallery.png3.96KB0.64KB▼ 83.72%
css/images/shadow-top-forward.png2.78KB0.56KB▼ 79.70%
icons/memberprofile.png4.25KB0.88KB▼ 79.40%
icons/infobox.png5.69KB1.28KB▼ 77.44%
icons/int-banner2.png3.59KB0.56KB▼ 84.31%