84% bootstrap-swipe-gallery

Code Review | Bootstrap Swipe Gallery

WordPress plugin Bootstrap Swipe Gallery scored84%from 54 tests.

About plugin

  • Plugin page: bootstrap-swipe-g...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9+
  • WordPress version: 6.3.1
  • First release: Jul 23, 2014
  • Latest release: Nov 7, 2017
  • Number of updates: 13
  • Update frequency: every 92.7 days
  • Top authors: ryankienstra (92.31%)rkienstr (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,800 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: ▼4.31ms] Passed 4 tests

Server-side resources used by Bootstrap Swipe Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.44 ▲2.49
Dashboard /wp-admin3.39 ▲0.0951.83 ▼1.39
Posts /wp-admin/edit.php3.50 ▲0.1548.42 ▼2.36
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.84 ▼15.99
Media Library /wp-admin/upload.php3.31 ▲0.0840.12 ▲3.28
Swipe Gallery /wp-admin/options-general.php?page=bsg_plugin_options3.2833.15

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

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

Browser metrics Passed 4 tests

Bootstrap Swipe Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.28 ▼1.471.76 ▲0.1045.83 ▲5.33
Dashboard /wp-admin2,225 ▲225.77 ▼0.13104.42 ▼2.3738.92 ▼4.41
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0142.88 ▲0.8235.30 ▼1.44
Add New Post /wp-admin/post-new.php1,561 ▲2123.38 ▲5.22643.31 ▼3.7055.90 ▼0.42
Media Library /wp-admin/upload.php1,404 ▲74.19 ▲0.00113.61 ▲5.7948.56 ▼1.57
Swipe Gallery /wp-admin/options-general.php?page=bsg_plugin_options8082.0227.7030.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BootstrapSwipeGallery\\esc_attr() in wp-content/plugins/bootstrap-swipe-gallery/php/templates/carousel.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BootstrapSwipeGallery\\add_action() in wp-content/plugins/bootstrap-swipe-gallery/php/class-options.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BootstrapSwipeGallery\\wp_kses_post() in wp-content/plugins/bootstrap-swipe-gallery/php/templates/controls.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

bootstrap-swipe-gallery/bootstrap-swipe-gallery.php Passed 13 tests

The main file in "Bootstrap Swipe Gallery" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
126 characters long description:
Swipe through gallery images on touch devices. Image sizes adjust to screen size. Requires a theme with Bootstrap 3 or higher.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected501 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP874414336
JavaScript2192382
CSS113067
XML15216

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.20
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
No PNG files were detected