78% bootstrap-slider-by-themescode

Code Review | Bootstrap Slider By themescode

WordPress plugin Bootstrap Slider By themescode scored78%from 54 tests.

About plugin

  • Plugin page: bootstrap-slider-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Apr 10, 2016
  • Number of updates: 6
  • Update frequency: every 26.7 days
  • Top authors: imranemu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,112 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.78ms] Passed 4 tests

An overview of server-side resources used by Bootstrap Slider By themescode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.48 ▼4.64
Dashboard /wp-admin3.36 ▲0.0646.29 ▼4.67
Posts /wp-admin/edit.php3.41 ▲0.0642.77 ▼0.51
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.06 ▼1.29
Media Library /wp-admin/upload.php3.28 ▲0.0632.64 ▲0.65
Categories /wp-admin/edit-tags.php?taxonomy=slider_category&post_type=tocode-slider3.2832.09
Add New Slider /wp-admin/post-new.php?post_type=tocode-slider3.3747.09
TC Sliders /wp-admin/edit.php?post_type=tocode-slider3.3332.66
Slider Settings /wp-admin/edit.php?post_type=tocode-slider&page=slider_setting3.2532.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Bootstrap Slider By themescode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.43 ▲0.051.63 ▼0.0842.54 ▼4.00
Dashboard /wp-admin2,238 ▲505.79 ▲0.9599.20 ▼2.4939.16 ▼0.94
Posts /wp-admin/edit.php2,121 ▲322.02 ▼0.0435.29 ▼6.3935.35 ▼2.00
Add New Post /wp-admin/post-new.php1,571 ▲4318.38 ▲0.28584.49 ▼30.3546.13 ▼3.90
Media Library /wp-admin/upload.php1,423 ▲354.21 ▼0.02128.69 ▲27.7052.78 ▲5.31
Categories /wp-admin/edit-tags.php?taxonomy=slider_category&post_type=tocode-slider1,2942.2626.9727.64
Add New Slider /wp-admin/post-new.php?post_type=tocode-slider1,8073.7364.6233.45
TC Sliders /wp-admin/edit.php?post_type=tocode-slider1,0972.0830.7228.48
Slider Settings /wp-admin/edit.php?post_type=tocode-slider&page=slider_setting8942.0623.3425.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bootstrap-slider-by-themescode/libs/cpt.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bootstrap-slider-by-themescode/public/tcode-slider-view.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bootstrap-slider-by-themescode/bootstrap-slider-by-themescode.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bootstrap-slider-by-themescode/admin/tcode-slider-setting.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=tocode-slider&page=slider_setting
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=tocode-slider&page=slider_setting 153 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/edit.php?post_type=tocode-slider&page=slider_setting
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=tocode-slider&page=slider_setting 158 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: bootstrap carousel slider, bootstrap responsive slider, bootstrap slider, themescode, boostrap carousel

bootstrap-slider-by-themescode/bootstrap-slider-by-themescode.php 92% from 13 tests

The primary PHP file in "Bootstrap Slider By themescode" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected546 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
SVG100288
PHP42919165
CSS217991
JavaScript1052

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png0.38KB0.32KB▼ 15.89%