83% bh-basic-slider

Code Review | BH Basic Slider

WordPress plugin BH Basic Slider scored83%from 54 tests.

About plugin

  • Plugin page: bh-basic-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2013
  • Latest release: Nov 30, 2013
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: masumbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,199 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.03MB] [CPU: ▼7.03ms] Passed 4 tests

Analyzing server-side resources used by BH Basic Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.32 ▼3.96
Dashboard /wp-admin3.33 ▲0.0344.78 ▼2.02
Posts /wp-admin/edit.php3.38 ▲0.0346.63 ▼3.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.76 ▼18.68
Media Library /wp-admin/upload.php3.25 ▲0.0334.10 ▲0.95
BH Slider /wp-admin/edit.php?post_type=bh_slider_post3.3034.88
Add New /wp-admin/post-new.php?post_type=bh_slider_post3.3848.36

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by BH Basic Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20613.66 ▼0.737.19 ▲5.2740.86 ▼7.19
Dashboard /wp-admin2,230 ▲425.83 ▼0.21106.69 ▲6.2239.04 ▼4.30
Posts /wp-admin/edit.php2,116 ▲272.05 ▲0.0339.30 ▲4.9136.26 ▲2.89
Add New Post /wp-admin/post-new.php1,565 ▲5123.26 ▲5.82647.46 ▼2.0544.03 ▼7.19
Media Library /wp-admin/upload.php1,415 ▲274.27 ▲0.0794.04 ▼1.4143.00 ▲0.49
BH Slider /wp-admin/edit.php?post_type=bh_slider_post1,0802.0030.4729.41
Add New /wp-admin/post-new.php?post_type=bh_slider_post2,1697.68186.3067.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bh-basic-slider/register-custom-post-type.php:23
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bh-basic-slider/bh-basic-slider.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bh-basic-slider/bh-basic-slider.php:17

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg)
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

bh-basic-slider/bh-basic-slider.php Passed 13 tests

Analyzing the main PHP file in "BH Basic Slider" version 1.0
112 characters long description:
This plugin made with flexslider. Supported all crosebrowser and Responsive. very nice and helpful slider plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected168 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2152373
CSS1122162
JavaScript10533

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bg_direction_nav.png1.82KB0.79KB▼ 56.38%
images/icon.png3.11KB0.48KB▼ 84.44%