88% slider-bootstrap-carousel

Code Review | Slider Bootstrap Carousel

WordPress plugin Slider Bootstrap Carousel scored 88% from 54 tests.

About plugin

  • Plugin page: slider-bootstrap-...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 5.8.1
  • First release: Feb 8, 2018
  • Latest release: Jan 16, 2019
  • Number of updates: 29
  • Update frequency: every 11.8 days
  • Top authors: felipermendes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,689 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼142.67ms] Passed 4 tests

An overview of server-side resources used by Slider Bootstrap Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.2837.80 ▲13.49
Dashboard /wp-admin3.22 ▲0.1646.06 ▼6.55
Posts /wp-admin/edit.php3.33 ▲0.2251.08 ▲2.61
Add New Post /wp-admin/post-new.php5.59 ▲0.15104.34 ▼556.76
Media Library /wp-admin/upload.php3.16 ▲0.1537.42 ▼9.97
Category /wp-admin/edit-tags.php?taxonomy=taxonomy_category&post_type=bootstrap_carousel3.1638.35
All Carousels /wp-admin/edit.php?post_type=bootstrap_carousel3.2038.93
Add New /wp-admin/post-new.php?post_type=bootstrap_carousel3.2050.65

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Slider Bootstrap Carousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,866 ▲27016.43 ▲0.6113.52 ▲3.6256.94 ▲9.06
Dashboard /wp-admin3,010 ▲795.91 ▼0.08147.67 ▼5.17117.98 ▼6.34
Posts /wp-admin/edit.php2,779 ▲402.70 ▲0.0268.99 ▼3.0393.50 ▲0.94
Add New Post /wp-admin/post-new.php1,727 ▲4418.73 ▼0.10369.81 ▼15.25131.63 ▲7.02
Media Library /wp-admin/upload.php1,847 ▲405.04 ▲0.06160.75 ▲3.07117.21 ▼10.45
Category /wp-admin/edit-tags.php?taxonomy=taxonomy_category&post_type=bootstrap_carousel1,7762.5064.1183.88
All Carousels /wp-admin/edit.php?post_type=bootstrap_carousel1,4452.6164.6476.68
Add New /wp-admin/post-new.php?post_type=bootstrap_carousel2,6984.79127.83106.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=bootstrap_carousel
    • > Notice in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-meta-box.php+39
    Undefined variable: imageValue
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bootstrap_carousel
    • > Notice in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-meta-box.php+52
    Undefined variable: targetValue
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bootstrap_carousel
    • > Notice in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-meta-box.php+67
    Undefined variable: sizeValue

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 fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bootstrap-carousel/includes/bcfw-taxonomy-category.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/slider-bootstrap-carousel/includes/lib/multi-post-thumbnails/multi-post-thumbnails.php:482
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-taxonomy-category.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-shortcode.php:126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/slider-bootstrap-carousel/includes/lib/multi-post-thumbnails/multi-post-thumbnails.php:482
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-meta-box.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bootstrap-carousel/includes/sbc-plugin-scripts.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slider-bootstrap-carousel/includes/bcfw-shortcode.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bootstrap-carousel/includes/bcfw-plugin-scripts.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-bootstrap-carousel/includes/bcfw-meta-box.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: boostrap, bootstrap slider, slider, boostrap carousel, responsive slider...

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

"Slider Bootstrap Carousel" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
27 characters long description:
Slider Bootstrap 4 Carousel

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,117 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP10183209777
PO File44248172
JavaScript42014111
Markdown29026
JSON10015
Ruby13011
CSS2005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods631.58%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.81MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png142.66KB39.20KB▼ 72.53%
assets/banner-1544x500-rtl.png15.64KB7.03KB▼ 55.07%
assets/banner-772x250.png14.95KB7.41KB▼ 50.40%
assets/banner-772x250-rtl.png14.95KB7.41KB▼ 50.40%
includes/lib/multi-post-thumbnails/screenshot-2.png128.43KB43.77KB▼ 65.92%