84% shortcodes-bootstrap

Code Review | Shortcodes Bootstrap

WordPress plugin Shortcodes Bootstrap scored 84% from 54 tests.

About plugin

  • Plugin page: shortcodes-bootstrap
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2014
  • Latest release: Dec 9, 2014
  • Number of updates: 8
  • Update frequency: every 6.1 days
  • Top authors: Fastmover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 3,594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.01ms] Passed 4 tests

Analyzing server-side resources used by Shortcodes Bootstrap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.34 ▼4.09
Dashboard /wp-admin3.37 ▲0.0647.37 ▼3.19
Posts /wp-admin/edit.php3.48 ▲0.1246.66 ▼4.22
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.84 ▼0.53
Media Library /wp-admin/upload.php3.29 ▲0.0637.65 ▲1.32
Shortcode Bootstrap options /wp-admin/options-general.php?page=shortcodes-bootstrap/ShortcodesBootstrap.php3.2634.61

Server storage [IO: ▲0.41MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
dwsc_options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Shortcodes Bootstrap: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲19414.29 ▼0.087.62 ▲5.8442.10 ▼2.58
Dashboard /wp-admin2,214 ▲265.88 ▼0.02106.04 ▲4.9441.11 ▲5.61
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0542.02 ▲3.1636.98 ▲1.48
Add New Post /wp-admin/post-new.php1,533 ▼518.05 ▼5.12587.26 ▼20.4051.07 ▼11.24
Media Library /wp-admin/upload.php1,399 ▲114.28 ▲0.1294.82 ▼1.7142.36 ▲0.24
Shortcode Bootstrap options /wp-admin/options-general.php?page=shortcodes-bootstrap/ShortcodesBootstrap.php8292.3127.5328.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • dwsc_options
    • can_compress_scripts

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
Almost there! Just fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_grid.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_grid.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_tabs.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_icons.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_alert.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_buttons.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-bootstrap/inc/dws_collapse.php:22

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: shortcodes, responsive, bootstrap, buttons, shortcode...

shortcodes-bootstrap/ShortcodesBootstrap.php 92% from 13 tests

The main file in "Shortcodes Bootstrap" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shortcodes-bootstrap.php" instead of "ShortcodesBootstrap.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 plugin6,171 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS4212555,053
HTML3890605
PHP74679266
JavaScript10916236
Markdown18011

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.08
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
13 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/labels.png0.52KB0.37KB▼ 29.40%
assets/images/icons.png0.57KB0.61KB0.00%
assets/images/collapse.png0.44KB0.36KB▼ 18.89%
assets/images/grid.png0.23KB0.20KB▼ 12.39%
assets/img/facebook.png1.89KB1.10KB▼ 41.73%