78% ws-bootstrap-vc

Code Review | WS Bootstrap

WordPress plugin WS Bootstrap scored 78% from 54 tests.

About plugin

  • Plugin page: ws-bootstrap-vc
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.2
  • WordPress version: 5.9.2
  • First release: Aug 15, 2019
  • Latest release: Aug 22, 2019
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: xjohnyk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 572 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲4.30MB] [CPU: ▼279.19ms] Passed 4 tests

This is a short check of server-side resources used by WS Bootstrap
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.16 ▲4.6471.89 ▲21.25
Dashboard /wp-admin8.17 ▲4.7657.05 ▲23.93
Posts /wp-admin/edit.php8.18 ▲4.5357.08 ▲20.78
Add New Post /wp-admin/post-new.php10.22 ▲3.25118.93 ▼1,178.53
Media Library /wp-admin/upload.php8.17 ▲4.8842.14 ▲19.74
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius8.1741.64

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 215 new files
Database: no new tables, 5 new options
New WordPress options
fs_api_cache
fs_gdpr
fs_debug_mode
fs_accounts
fs_active_plugins

Browser metrics Passed 4 tests

An overview of browser requirements for WS Bootstrap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,983 ▲22916.52 ▲0.8512.05 ▲6.313.34 ▲0.65
Dashboard /wp-admin2,969 ▲1086.14 ▼0.16120.58 ▼12.50174.17 ▲9.09
Posts /wp-admin/edit.php2,768 ▲773.37 ▲0.1365.64 ▲3.17160.71 ▲15.33
Add New Post /wp-admin/post-new.php1,702 ▲4116.09 ▼0.87434.87 ▲22.04153.99 ▼9.76
Media Library /wp-admin/upload.php1,779 ▲815.51 ▲0.04152.11 ▲0.91202.61 ▲9.42
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius1,4882.4955.33129.01

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
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts
    • fs_api_cache
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ws-bootstrap-vc/lib/vc/params/column_offset.php
    • > /wp-content/plugins/ws-bootstrap-vc/freemius/templates/ajax-loader.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ws-bootstrap-vc/admin/pages/admin-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/ws-bootstrap-vc/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ws-bootstrap-vc/admin/pages/admin-subpage-vc.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ws-bootstrap-vc/freemius/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: Please take inspiration from this readme.txt

ws-bootstrap-vc/ws-bootstrap-vc.php Passed 13 tests

The main PHP script in "WS Bootstrap" version 1.0.2 is automatically included on every request by WordPress
127 characters long description:
Add Bootstrap to your Wordpress, plugin add great shortcodes which you can use to create Jumbotron, Popover, Cards, Modals etc.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected61,490 lines of code in 150 files:
LanguageFilesBlank linesComment linesLines of code
PHP1136,70515,31628,279
CSS171,4644212,690
PO File105,7106,91312,558
JavaScript102,0371,7667,963

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,609)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity76.35
▷ Minimum class complexity1.00
▷ Maximum class complexity2,609.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,097
▷ Static methods17515.95%
▷ Public methods76669.83%
▷ Protected methods151.37%
▷ Private methods31628.81%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants119
▷ Global constants9680.67%
▷ Class constants2319.33%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/ws-bootstrap-vc.png9.16KB5.26KB▼ 42.58%