72% the-bootstrap-themes-companion

Code Review | The Bootstrap Theme Companion

WordPress plugin The Bootstrap Theme Companion scored72%from 54 tests.

About plugin

  • Plugin page: the-bootstrap-the...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 7, 2021
  • Latest release: Aug 7, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: thebootstrapthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,040 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.01ms] Passed 4 tests

This is a short check of server-side resources used by The Bootstrap Theme Companion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.40 ▼6.76
Dashboard /wp-admin3.40 ▲0.1054.93 ▲5.61
Posts /wp-admin/edit.php3.52 ▲0.1748.86 ▲4.24
Add New Post /wp-admin/post-new.php5.98 ▲0.1084.68 ▼2.63
Media Library /wp-admin/upload.php3.31 ▲0.0833.66 ▲1.10
View Source of Fund /wp-admin/edit.php?post_type=project&page=view-sof3.0724.59
Bootstrap Toolkit /wp-admin/admin.php?page=bootstrap-toolkit3.3032.06
Testimonials /wp-admin/edit.php?post_type=tbtc_testimonials3.3841.68
Price Table /wp-admin/edit.php?post_type=tbtc_price3.3840.38
Client Logo /wp-admin/admin.php?page=cleint-logo3.3035.87
Teams /wp-admin/edit.php?post_type=tbtc_teams3.3836.80

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for The Bootstrap Theme Companion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲32015.09 ▲0.794.85 ▲2.7139.98 ▼6.06
Dashboard /wp-admin2,394 ▲2096.50 ▲1.61133.32 ▲16.9644.62 ▼1.05
Posts /wp-admin/edit.php2,305 ▲2133.37 ▲1.3748.24 ▲10.4332.47 ▼4.43
Add New Post /wp-admin/post-new.php1,556 ▲4223.00 ▲5.57615.87 ▼75.7336.74 ▼21.13
Media Library /wp-admin/upload.php1,441 ▲564.18 ▼0.1979.65 ▼19.8241.18 ▼3.60
View Source of Fund /wp-admin/edit.php?post_type=project&page=view-sof280.440.093.49
Bootstrap Toolkit /wp-admin/admin.php?page=bootstrap-toolkit9863.0941.6124.87
Testimonials /wp-admin/edit.php?post_type=tbtc_testimonials1,3043.3248.4425.22
Price Table /wp-admin/edit.php?post_type=tbtc_price1,3043.4843.8826.61
Client Logo /wp-admin/admin.php?page=cleint-logo1,0923.1939.3123.93
Teams /wp-admin/edit.php?post_type=tbtc_teams1,3043.4044.3527.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/the-bootstrap-themes-companion/public/partials/tbthemes-companion-public-display.php
    • > /wp-content/plugins/the-bootstrap-themes-companion/admin/partials/tbthemes-companion-admin-display.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-bootstrap-themes-companion/includes/metabox/save-metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-bootstrap-themes-companion/includes/class-tbthemes-companion-posttype.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/the-bootstrap-themes-companion/public/shortcode-layouts/testimonial-layout.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/the-bootstrap-themes-companion/public/shortcode-layouts/price-layout.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/the-bootstrap-themes-companion/public/shortcode-layouts/team-layout.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-bootstrap-themes-companion/includes/metabox/add-metabox.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=project&page=view-sof
    • > Network (severe)
    wp-admin/edit.php?post_type=project&page=view-sof - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: companion, business

the-bootstrap-themes-companion/tbthemes-companion.php 85% from 13 tests

"The Bootstrap Theme Companion" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("the-bootstrap-themes-companion.php" instead of "tbthemes-companion.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin676 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP21220590549
CSS24683
JavaScript3173244

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.78
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin