10% bootstrap

Code Review | Bootstrap

WordPress plugin Bootstrap scored10%from 54 tests.

About plugin

  • Plugin page: bootstrap
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Aug 31, 2011
  • Latest release: May 11, 2013
  • Number of updates: 24
  • Update frequency: every 25.8 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /21,010 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/bootstrap/bootstrap.php+150
    Non-static method Bootstrap_Toolkit::get_instance() should not be called statically

Server metrics [RAM: ▼1.96MB] [CPU: ▼57.00ms] Passed 4 tests

Analyzing server-side resources used by Bootstrap
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.35 ▼38.30
Dashboard /wp-admin2.05 ▼1.265.47 ▼47.43
Posts /wp-admin/edit.php2.05 ▼1.315.64 ▼43.58
Add New Post /wp-admin/post-new.php2.05 ▼3.846.22 ▼98.70
Media Library /wp-admin/upload.php2.05 ▼1.185.03 ▼36.72
Bootstrap /wp-admin/themes.php?page=bootstrap-options2.055.19

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bootstrap
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.22 ▼1.151.72 ▼0.0344.26 ▲2.44
Dashboard /wp-admin2,225 ▲315.88 ▼0.12105.63 ▼4.6644.51 ▼0.10
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0440.17 ▲0.7836.78 ▲0.65
Add New Post /wp-admin/post-new.php1,529 ▼15017.55 ▼4.66667.09 ▲64.6563.93 ▲4.05
Media Library /wp-admin/upload.php1,404 ▲44.13 ▼0.05106.17 ▲1.7948.51 ▲1.99
Bootstrap /wp-admin/themes.php?page=bootstrap-options1,7212.0322.2140.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/bootstrap/bootstrap.php+150
    Non-static method Bootstrap_Toolkit::get_instance() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > Deprecated in wp-content/plugins/bootstrap/bootstrap.php+150
    Non-static method Bootstrap_Toolkit::get_instance() should not be called statically
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > Notice in wp-content/plugins/bootstrap/bootstrap.php+115
    Undefined index: vars
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 37 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > Notice in wp-content/plugins/bootstrap/views/admin.php+46
    Undefined index: less
  • 50 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > Notice in wp-content/plugins/bootstrap/views/admin.php+63
    Trying to access array offset on value of type null
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=bootstrap-options
    • > Notice in wp-content/plugins/bootstrap/views/admin.php+63
    Undefined index: js

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/bootstrap/bootstrap.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/bootstrap/views/admin.php:16

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: theme, stylesheet, css, twitter-bootstrap

bootstrap/bootstrap.php Passed 13 tests

The main file in "Bootstrap" v. 0.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
Easy embed Twitter Bootstrap toolkit.

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
No dangerous file extensions were detected8,559 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
LESS397188594,217
PHP36263722,899
JavaScript145493331,402
CSS13041

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity108.67
▷ Minimum class complexity1.00
▷ Maximum class complexity328.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods173
▷ Static methods42.31%
▷ Public methods4224.28%
▷ Protected methods13175.72%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin