84% sx-bootstrap-carousel

Code Review | SX Bootstrap Carousel

WordPress plugin SX Bootstrap Carousel scored84%from 54 tests.

About plugin

  • Plugin page: sx-bootstrap-caro...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.6-4.4
  • WordPress version: 6.3.1
  • First release: Mar 2, 2016
  • Latest release: Mar 2, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: sabrex82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.91ms] Passed 4 tests

Server-side resources used by SX Bootstrap Carousel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1844.63 ▲5.33
Dashboard /wp-admin3.51 ▲0.2051.05 ▼1.47
Posts /wp-admin/edit.php3.62 ▲0.2647.74 ▼6.13
Add New Post /wp-admin/post-new.php6.09 ▲0.2096.11 ▼2.37
Media Library /wp-admin/upload.php3.43 ▲0.2038.21 ▼5.67
Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=sxbc3.4238.16
Carousel /wp-admin/edit.php?post_type=sxbc3.4739.47
Settings /wp-admin/edit.php?post_type=sxbc&page=sx-bootstrap-carousel3.4035.88
Add New /wp-admin/post-new.php?post_type=sxbc3.5852.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SX Bootstrap Carousel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.30 ▼1.082.14 ▲0.4045.01 ▲1.05
Dashboard /wp-admin2,256 ▲504.84 ▼1.06111.44 ▲7.0244.71 ▲2.40
Posts /wp-admin/edit.php2,135 ▲382.02 ▲0.0335.19 ▼3.6433.81 ▼2.18
Add New Post /wp-admin/post-new.php1,583 ▲5018.02 ▼5.43642.41 ▼8.6956.92 ▲4.20
Media Library /wp-admin/upload.php1,438 ▲384.20 ▲0.08100.56 ▼25.0146.33 ▼2.13
Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=sxbc1,3062.1427.7029.00
Carousel /wp-admin/edit.php?post_type=sxbc1,1242.0232.8931.62
Settings /wp-admin/edit.php?post_type=sxbc&page=sx-bootstrap-carousel1,2482.0522.9632.90
Add New /wp-admin/post-new.php?post_type=sxbc2,5387.61171.8571.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • sxbc_settings
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 4× 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/sx-bootstrap-carousel/sxbc-frontend.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sx-bootstrap-carousel/sx-bootstrap-carousel.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sx-bootstrap-carousel/sxbc-admin.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sx-bootstrap-carousel/sxbc-settings.php:15

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: slider, image, bootstrap, carousel

sx-bootstrap-carousel/sx-bootstrap-carousel.php 92% from 13 tests

The entry point to "SX Bootstrap Carousel" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 239 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,052 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP46993848
PO File27682204

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin