83% amazing-service-box-visual-composer-addons

Code Review | Amazing service box Addons For WPBakery Page Builder (formerly Visual Composer)

WordPress plugin Amazing service box Addons For WPBakery Page Builder (formerly Visual Composer) scored83%from 54 tests.

About plugin

  • Plugin page: amazing-service-b...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Oct 28, 2019
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: zia420 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.76ms] Passed 4 tests

Analyzing server-side resources used by Amazing service box Addons For WPBakery Page Builder (formerly Visual Composer)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.48 ▼0.97
Dashboard /wp-admin3.32 ▲0.0248.15 ▼2.96
Posts /wp-admin/edit.php3.37 ▲0.0249.17 ▲1.46
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.80 ▼12.58
Media Library /wp-admin/upload.php3.25 ▲0.0237.84 ▲4.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 194 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Amazing service box Addons For WPBakery Page Builder (formerly Visual Composer)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.31 ▼1.128.77 ▲6.9043.30 ▼4.46
Dashboard /wp-admin2,210 ▲184.88 ▼0.07111.10 ▼18.5441.00 ▼6.75
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0342.07 ▲3.0335.01 ▲0.12
Add New Post /wp-admin/post-new.php1,518 ▲423.21 ▲5.73675.80 ▼1.9951.76 ▼8.01
Media Library /wp-admin/upload.php1,392 ▲14.25 ▲0.0797.68 ▼4.2142.26 ▼5.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 16× 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 add_filter() in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/vc_param.php:35
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 41
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 38
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 8
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 32
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 23
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 35
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 38
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 17
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/amazing-service-box-visual-composer-addons/vc_elements/vc_param/button_css.php on line 41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

amazing-service-box-visual-composer-addons/asb_addon.php 85% from 13 tests

The main PHP script in "Amazing service box Addons For WPBakery Page Builder (formerly Visual Composer)" version 2.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("amazing-service-box-visual-composer-addons.php" instead of "asb_addon.php")
  • Description: The description should be shorter than 140 characters (currently 181 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin7,610 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
SVG79207774,469
PHP6212621,846
JavaScript95065744
CSS4519551

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.83
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity6.96
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods2295.65%
▷ Protected methods14.35%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
31 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vc_elements/images/soical-share/ts-social-style-6.png4.16KB2.21KB▼ 46.86%
vc_elements/images/button/button-17.png2.51KB1.65KB▼ 34.27%
vc_elements/images/soical-share/ts-social-style-2.png3.04KB2.03KB▼ 33.29%
vc_elements/images/soical-share/ts-social-style-10.png5.14KB2.57KB▼ 50.08%
vc_elements/images/soical-share/ts-social-style-4.png8.16KB3.61KB▼ 55.73%