84% bootstrap-shortcodes-for-content

Code Review | Bootstrap ShortCodes for Content

WordPress plugin Bootstrap ShortCodes for Content scored84%from 54 tests.

About plugin

  • Plugin page: bootstrap-shortco...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Feb 18, 2015
  • Latest release: Nov 30, 2020
  • Number of updates: 58
  • Update frequency: every 36.4 days
  • Top authors: closemarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /6,899 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.65MB] [CPU: ▼1.94ms] Passed 4 tests

This is a short check of server-side resources used by Bootstrap ShortCodes for Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7046.29 ▲4.90
Dashboard /wp-admin3.98 ▲0.6851.47 ▼0.42
Posts /wp-admin/edit.php4.03 ▲0.6849.09 ▼2.22
Add New Post /wp-admin/post-new.php6.50 ▲0.6295.49 ▼10.02
Media Library /wp-admin/upload.php3.84 ▲0.6241.30 ▲5.82

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 13 new options
New WordPress options
widget_widget_entcat
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_childmenutext
widget_contact_widget
db_upgraded
widget_menuicotext
widget_socialtext
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bootstrap ShortCodes for Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.301.80 ▲0.0845.82 ▲3.92
Dashboard /wp-admin2,189 ▲115.53 ▼0.3391.58 ▼17.1837.32 ▼8.72
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0238.12 ▼2.6033.22 ▼3.03
Add New Post /wp-admin/post-new.php1,535 ▲718.26 ▼4.83623.45 ▼46.1167.44 ▲15.74
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.06100.39 ▼20.7947.43 ▼3.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_socialtext
    • widget_recent-posts
    • widget_last-tweets
    • widget_menuicotext
    • widget_widget_entcat
    • widget_contact_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • ...

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/shortcode-gridbox.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/widgets/latest-tweets.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/shortcode-tabs.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/widgets/contact.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/widgets/entriesbycategory.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/widgets/childmenu.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/shortcode-gallery.php:124
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/shortcode-imagepost.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/shortcode-links.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bootstrap-shortcodes-for-content/includes/general-settings.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: bootstrap, bootstrap helper, content, shortcodes, ui

bootstrap-shortcodes-for-content/bootstrap-sc-content.php 85% from 13 tests

The main PHP file in "Bootstrap ShortCodes for Content" ver. 1.2.5 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bootstrap-shortcodes-for-content.php" instead of "bootstrap-sc-content.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,372 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP227087012,911
JavaScript2107158461

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity41.33
▷ Minimum class complexity8.00
▷ Maximum class complexity257.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods89
▷ Static methods00.00%
▷ Public methods89100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin