78% bb-gallery

Code Review | Backbone Bootstrap Gallery

WordPress plugin Backbone Bootstrap Gallery scored78%from 54 tests.

About plugin

  • Plugin page: bb-gallery
  • Plugin version: 1.8.2.4.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Jun 1, 2018
  • Number of updates: 85
  • Update frequency: every 10.5 days
  • Top authors: Magenta Cuda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.08ms] Passed 4 tests

This is a short check of server-side resources used by Backbone Bootstrap Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.17 ▼4.27
Dashboard /wp-admin3.36 ▲0.0649.77 ▼1.73
Posts /wp-admin/edit.php3.41 ▲0.0550.45 ▼1.38
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.20 ▼8.93
Media Library /wp-admin/upload.php3.28 ▲0.0538.66 ▲2.45
BB Tags /wp-admin/edit-tags.php?taxonomy=bb_tags&post_type=attachment3.3736.08

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

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

Browser metrics Passed 4 tests

Backbone Bootstrap Gallery: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.24 ▼0.021.87 ▼0.0043.45 ▼1.67
Dashboard /wp-admin2,213 ▲335.63 ▼0.0991.54 ▼1.3644.47 ▼0.03
Posts /wp-admin/edit.php2,119 ▲192.14 ▲0.1741.49 ▲6.0938.19 ▲1.99
Add New Post /wp-admin/post-new.php1,538 ▲323.08 ▲4.83657.81 ▲13.8967.83 ▲5.69
Media Library /wp-admin/upload.php1,418 ▲184.21 ▲0.04100.78 ▼4.3545.48 ▼0.17
BB Tags /wp-admin/edit-tags.php?taxonomy=bb_tags&post_type=attachment1,2642.2527.5432.88

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bb-gallery/bbg_xiv-gallery_templates_wp_rest.php
  • 2× 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/bb-gallery/bbg_xiv-gallery.php:877
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bb-gallery/bbg_xiv-gallery_templates_wp_rest.php:79

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: gallery, slideshow, shortcode, responsive, replacement...

bb-gallery/bbg_xiv-gallery.php 92% from 13 tests

The entry point to "Backbone Bootstrap Gallery" version 1.8.2.4.5.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("bb-gallery.php" instead of "bbg_xiv-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin15,933 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS5381527,918
JavaScript91,3669836,234
PHP3711051,493
SVG100288

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity162.00
▷ Minimum class complexity162.00
▷ Maximum class complexity162.00
Average method complexity11.00
▷ Minimum method complexity4.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions00.00%
▷ Anonymous functions36100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin