89% tc-bootstrap-carousel

Code Review | TC Bootstrap Carousel

WordPress plugin TC Bootstrap Carousel scored 89% from 54 tests.

About plugin

  • Plugin page: tc-bootstrap-caro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 5.8.1
  • First release: Apr 12, 2016
  • Latest release: Apr 12, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: themescode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 961 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by TC Bootstrap Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1735.17 ▲14.70
Dashboard /wp-admin3.12 ▲0.0642.85 ▲0.40
Posts /wp-admin/edit.php3.17 ▲0.0645.02 ▲3.38
Add New Post /wp-admin/post-new.php5.48 ▲0.0488.50 ▼560.23
Media Library /wp-admin/upload.php3.06 ▲0.0631.68 ▼2.28
Categories /wp-admin/edit-tags.php?taxonomy=Carousel_category&post_type=tc-bcarousel3.0632.35
Slider Settings /wp-admin/edit.php?post_type=tc-bcarousel&page=slider_setting3.0327.86
All Carousels /wp-admin/edit.php?post_type=tc-bcarousel3.1032.87
Add New Carousel /wp-admin/post-new.php?post_type=tc-bcarousel3.1251.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for TC Bootstrap Carousel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,730 ▲14816.00 ▲0.1510.68 ▲3.0050.58 ▼3.84
Dashboard /wp-admin3,015 ▲845.98 ▼0.10153.41 ▲14.25116.75 ▼12.20
Posts /wp-admin/edit.php2,784 ▲452.72 ▼0.0063.55 ▲0.6588.27 ▼5.71
Add New Post /wp-admin/post-new.php1,529 ▼14118.68 ▼0.43382.20 ▲18.29110.74 ▲7.09
Media Library /wp-admin/upload.php1,852 ▲425.01 ▼0.04143.85 ▲4.59123.87 ▲4.63
Categories /wp-admin/edit-tags.php?taxonomy=Carousel_category&post_type=tc-bcarousel1,7842.3860.5783.06
Slider Settings /wp-admin/edit.php?post_type=tc-bcarousel&page=slider_setting1,1872.1051.5780.96
All Carousels /wp-admin/edit.php?post_type=tc-bcarousel1,4512.6358.8472.49
Add New Carousel /wp-admin/post-new.php?post_type=tc-bcarousel2,3924.60103.1491.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-bootstrap-carousel/libs/cpt.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-bootstrap-carousel/admin/tc-bcarousel-setting.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tc-bootstrap-carousel/public/tc-bcarousel-view.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tc-bootstrap-carousel/tc-bootstrap-carousel.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=tc-bcarousel&page=slider_setting
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=tc-bcarousel&page=slider_setting 153 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/edit.php?post_type=tc-bcarousel&page=slider_setting
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=tc-bcarousel&page=slider_setting 158 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: bootstrap responsive slider, bootstrap slider, themescode, bootstrap carousel slider, boostrap carousel

tc-bootstrap-carousel/tc-bootstrap-carousel.php Passed 13 tests

Analyzing the main PHP file in "TC Bootstrap Carousel" version 1.0
72 characters long description:
Twitter Bootstrap based professional WordPress carousel slider plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin549 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG100288
PHP44218171
CSS117590

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png0.38KB0.32KB▼ 15.89%