74% flat-file-bootstrap-slider

Code Review | Bootstrap Flat File Slider

WordPress plugin Bootstrap Flat File Slider scored74%from 54 tests.

About plugin

  • Plugin page: flat-file-bootstr...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Feb 29, 2016
  • Latest release: Dec 24, 2020
  • Number of updates: 40
  • Update frequency: every 44.1 days
  • Top authors: kiranpatil353 (92.5%)clarionwpdeveloper (10%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,004 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.28ms] Passed 4 tests

Server-side resources used by Bootstrap Flat File Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.48 ▼2.00
Dashboard /wp-admin3.32 ▲0.0245.34 ▼2.04
Posts /wp-admin/edit.php3.37 ▲0.0146.29 ▼2.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.42 ▼10.41
Media Library /wp-admin/upload.php3.24 ▲0.0136.77 ▲0.79
Add Slide /wp-admin/admin.php?page=addnew_slider3.2132.25
Flat File Slider /wp-admin/admin.php?page=flat-file-slider-top3.2130.42

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

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

Browser metrics Passed 4 tests

Bootstrap Flat File Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.61 ▼0.752.84 ▲0.7943.17 ▼0.07
Dashboard /wp-admin2,230 ▲455.87 ▲0.82109.79 ▲8.5738.82 ▼5.38
Posts /wp-admin/edit.php2,116 ▲272.01 ▲0.0139.72 ▼1.3034.82 ▲0.05
Add New Post /wp-admin/post-new.php1,536 ▲517.82 ▼0.32683.45 ▲76.4666.70 ▲13.11
Media Library /wp-admin/upload.php1,418 ▲274.17 ▼0.0396.56 ▼7.9446.81 ▲1.64
Add Slide /wp-admin/admin.php?page=addnew_slider8512.0430.7832.07
Flat File Slider /wp-admin/admin.php?page=flat-file-slider-top7992.0625.4025.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/flat-file-bootstrap-slider/index.php+61
    rmdir(wp-content/uploads/ffsb-slider/): Directory not empty
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/flat-file-bootstrap-slider/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flat-file-bootstrap-slider/libs/cpt.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flat-file-bootstrap-slider/admin/slider-add-new.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/flat-file-bootstrap-slider/libs/slider-slider-view.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
5 plugin tags: bootstrap slider, carousal, slider, flat theme, flat file slider

flat-file-bootstrap-slider/index.php 92% from 13 tests

The main file in "Bootstrap Flat File Slider" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flat-file-bootstrap-slider.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected824 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP45530437
SVG100288
CSS2171091
JavaScript2258

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
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%