77% wg-bootstrap-carousel

Code Review | WG Bootstrap Carousel

WordPress plugin WG Bootstrap Carousel scored77%from 54 tests.

About plugin

  • Plugin page: wg-bootstrap-caro...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Jun 23, 2016
  • Number of updates: 27
  • Update frequency: every 0.8 days
  • Top authors: iyas0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.59MB] [CPU: ▼18.72ms] Passed 4 tests

This is a short check of server-side resources used by WG Bootstrap Carousel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.55 ▲0.37
Dashboard /wp-admin3.40 ▲0.1047.63 ▼6.52
Posts /wp-admin/edit.php3.45 ▲0.0953.62 ▲3.42
Add New Post /wp-admin/post-new.php3.24 ▼2.6538.50 ▼68.31
Media Library /wp-admin/upload.php3.32 ▲0.0937.87 ▼0.41
View WGBC Carousels /wp-admin/edit.php?post_type=wgbc_carousels3.3638.02
Add New WGBC Carousel /wp-admin/post-new.php?post_type=wgbc_carousels3.1834.81

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WG Bootstrap Carousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,116 ▲34514.50 ▲0.1314.40 ▲12.5751.84 ▲10.13
Dashboard /wp-admin2,233 ▲484.85 ▼0.07106.09 ▼6.8044.27 ▲3.72
Posts /wp-admin/edit.php2,119 ▲302.05 ▲0.0737.06 ▼2.8737.13 ▲2.51
Add New Post /wp-admin/post-new.php1,564 ▲4523.03 ▼0.19662.95 ▼35.6358.02 ▲7.34
Media Library /wp-admin/upload.php1,418 ▲304.23 ▲0.13105.68 ▼11.1748.39 ▼0.38
View WGBC Carousels /wp-admin/edit.php?post_type=wgbc_carousels1,1993.0255.1630.33
Add New WGBC Carousel /wp-admin/post-new.php?post_type=wgbc_carousels1,6413.4767.0931.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+230
    Undefined index: caption
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+315
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+231
    Undefined index: slide
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+315
    Undefined index: file0
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+338
    Undefined variable: slide
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+339
    Undefined variable: caption
    • > GET request to /wp-admin/post-new.php?post_type=wgbc_carousels
    • > Notice in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php+348
    Undefined variable: options

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wg-bootstrap-carousel/wgbc-boostrap-carousel.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wg-bootstrap-carousel/includes/wgbc-init.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can take inspiration from this readme.txt

wg-bootstrap-carousel/wgbc-boostrap-carousel.php 77% from 13 tests

"WG Bootstrap Carousel" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wg-bootstrap-carousel.php" instead of "wgbc-boostrap-carousel.php")

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
Good job! No executable or dangerous file extensions detected647 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP56031463
CSS11059
SVG10050
PO File1151546
JavaScript10029

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin