77% tiny-bootstrap-elements-light

Code Review | Tiny Bootstrap Elements Light

WordPress plugin Tiny Bootstrap Elements Light scored77%from 54 tests.

About plugin

  • Plugin page: tiny-bootstrap-el...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Aug 21, 2015
  • Number of updates: 9
  • Update frequency: every 18.7 days
  • Top authors: Migli (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /6,220 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.05MB] [CPU: ▼2.85ms] Passed 4 tests

An overview of server-side resources used by Tiny Bootstrap Elements Light
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.98 ▼4.17
Dashboard /wp-admin3.36 ▲0.0548.93 ▼2.68
Posts /wp-admin/edit.php3.41 ▲0.0554.24 ▼1.69
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.56 ▼1.80
Media Library /wp-admin/upload.php3.28 ▲0.0534.35 ▼2.73

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 124 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
tbel_version
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Tiny Bootstrap Elements Light
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▼0.021.81 ▲0.0844.66 ▼4.25
Dashboard /wp-admin2,211 ▲345.64 ▼0.0192.93 ▲6.8739.95 ▲0.88
Posts /wp-admin/edit.php2,119 ▲221.99 ▲0.0239.51 ▲1.8736.93 ▲0.80
Add New Post /wp-admin/post-new.php1,543 ▲1522.89 ▲0.10653.32 ▼21.0453.27 ▼3.36
Media Library /wp-admin/upload.php1,416 ▲224.17 ▼0.07102.63 ▼0.3744.38 ▲0.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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
Almost there! Just fix the following items
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/snippets/edit-snippet.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-snippet.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-alert.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/snippets/delete-snippet.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-label.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/snippets/add-new-snippet.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-badge.php
    • > /wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-btn.php
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: language in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-alert.php on line 14
    • > PHP Notice
      Undefined index: allowEdit in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-snippet.php on line 3
    • > PHP Notice
      Undefined variable: return_danger_msg in wp-content/plugins/tiny-bootstrap-elements-light/assets/snippets/edit-snippet.php on line 38
    • > PHP Notice
      Undefined index: language in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-label.php on line 14
    • > PHP Notice
      Undefined index: language in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-btn.php on line 6
    • > PHP Notice
      Undefined index: css_paths in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-badge.php on line 2
    • > PHP Notice
      Undefined index: language in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-snippet.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/tiny-bootstrap-elements-light/tiny-bootstrap-elements-light.php:12
    • > PHP Notice
      Undefined index: language in wp-content/plugins/tiny-bootstrap-elements-light/assets/snippets/delete-snippet.php on line 5
    • > PHP Notice
      Undefined index: css_paths in wp-content/plugins/tiny-bootstrap-elements-light/assets/bootstrap-label.php on line 2

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)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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:
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in tiny-bootstrap-elements-light/assets to your readme.txt
  • Tags: Too many tags (30 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

tiny-bootstrap-elements-light/tiny-bootstrap-elements-light.php 92% from 13 tests

The principal PHP file in "Tiny Bootstrap Elements Light" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 252 characters long)

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
Good job! No executable or dangerous file extensions detected8,383 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript611825874,821
PHP131971151,868
CSS1415566956
SVG300501
XML110237

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants200
▷ Global constants200100.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
12 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tables.png4.35KB3.45KB▼ 20.66%
assets/img/colorpicker/select.png0.35KB0.33KB▼ 7.16%
assets/img/colorpicker/gradient_grabber.png0.30KB0.23KB▼ 22.55%
assets/img/colorpicker/select4.png0.19KB0.15KB▼ 20.10%
assets/bootstrap.png0.82KB1.07KB0.00%