78% shortcode-bootstrap-visuals

Code Review | Lewe Bootstrap Visuals

WordPress plugin Lewe Bootstrap Visuals scored78%from 54 tests.

About plugin

  • Plugin page: shortcode-bootstr...
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2020
  • Latest release: Oct 27, 2022
  • Number of updates: 27
  • Update frequency: every 38.0 days
  • Top authors: glewe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,967 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
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.42ms] Passed 4 tests

A check of server-side resources used by Lewe Bootstrap Visuals
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1640.33 ▼0.65
Dashboard /wp-admin3.45 ▲0.1547.26 ▼4.66
Posts /wp-admin/edit.php3.57 ▲0.2154.03 ▲11.20
Add New Post /wp-admin/post-new.php6.04 ▲0.1580.87 ▼16.50
Media Library /wp-admin/upload.php3.38 ▲0.1535.26 ▲0.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lewe Bootstrap Visuals
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲11213.50 ▼0.888.48 ▲6.5138.28 ▼6.11
Dashboard /wp-admin2,206 ▲185.91 ▲1.02101.13 ▼19.0841.56 ▼4.12
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0237.44 ▼2.7534.25 ▼2.90
Add New Post /wp-admin/post-new.php1,533 ▲1923.13 ▲5.58670.68 ▲22.5958.11 ▼5.66
Media Library /wp-admin/upload.php1,391 ▲34.32 ▲0.1497.94 ▼7.8042.70 ▼1.96

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/shortcode-bootstrap-visuals/shortcode-bootstrap-visuals.php
    • > /wp-content/plugins/shortcode-bootstrap-visuals/trunk/shortcode-bootstrap-visuals.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcode-bootstrap-visuals/inc/shortcodes.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcode-bootstrap-visuals/trunk/inc/shortcodes.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
You can look at the official readme.txt

shortcode-bootstrap-visuals/shortcode-bootstrap-visuals.php Passed 13 tests

"Lewe Bootstrap Visuals" version 2.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
This plugin provides shortcodes for the most common Bootstrap 4 visual elements.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,415 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123799710
CSS11978571
JavaScript220101134

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity105.00
▷ Minimum class complexity105.00
▷ Maximum class complexity105.00
Average method complexity9.67
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.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
12 PNG files occupy 0.47MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-128x128.png17.23KB5.99KB▼ 65.23%
images/icon-80x80.png10.90KB3.78KB▼ 65.28%
images/icon-96x96.png12.98KB4.52KB▼ 65.20%
trunk/images/icon-96x96.png12.98KB4.52KB▼ 65.20%
trunk/assets/js/bsvbtn.png3.82KB1.19KB▼ 68.79%