84% content-slider-block

Code Review | Content Slider Block - Display slider in a beautiful way.

WordPress plugin Content Slider Block - Display slider in a beautiful way. scored84%from 54 tests.

About plugin

  • Plugin page: content-slider-block
  • Plugin version: 3.1.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 11, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 54
  • Update frequency: every 13.9 days
  • Top authors: charlescormier (98.15%)abuhayat (3.7%)

Code review

54 tests

User reviews

4 reviews

Install metrics

3,000+ active /33,911 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.19MB] [CPU: ▼12.74ms] Passed 4 tests

Analyzing server-side resources used by Content Slider Block - Display slider in a beautiful way.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1935.56 ▼5.15
Dashboard /wp-admin3.49 ▲0.1545.59 ▼12.89
Posts /wp-admin/edit.php3.60 ▲0.2550.35 ▼2.33
Add New Post /wp-admin/post-new.php6.10 ▲0.2286.04 ▼30.57
Media Library /wp-admin/upload.php3.41 ▲0.1936.68 ▲2.83
Content Slider Block /wp-admin/admin.php?page=content-slider-block3.3736.56

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
csb_pro-redirect
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Slider Block - Display slider in a beautiful way.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,611 ▼1,13512.85 ▼1.4410.20 ▲8.5835.23 ▼6.00
Dashboard /wp-admin2,209 ▲215.90 ▲0.02101.88 ▲3.1145.53 ▲1.39
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0042.71 ▲1.0936.94 ▲1.17
Add New Post /wp-admin/post-new.php6,202 ▲4,66019.66 ▲1.15877.02 ▲219.4335.90 ▼19.24
Media Library /wp-admin/upload.php1,382 ▼34.16 ▼0.02102.27 ▲1.8242.24 ▲0.04
Content Slider Block /wp-admin/admin.php?page=content-slider-block7862.2951.2026.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • csb_pro-redirect
    • can_compress_scripts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× 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/content-slider-block/inc/custom-post.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/content-slider-block/bplugins_sdk/inc/Base/Activate.php:3
    • > PHP Warning
      Use of undefined constant CSB_VERSION - assumed 'CSB_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/content-slider-block/dist/script.asset.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/content-slider-block/bplugins_sdk/inc/Base/License.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-slider-block/inc/pattern.php:4
    • > PHP Warning
      Use of undefined constant CSB_VERSION - assumed 'CSB_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/content-slider-block/dist/editor.asset.php on line 3

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 93% 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
These attributes need your attention:
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

content-slider-block/plugin.php 92% from 13 tests

"Content Slider Block - Display slider in a beautiful way." version 3.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("content-slider-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,118 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP1412642703
JavaScript177239489
PO File2158298347
JSON500346
Sass3115184
CSS54449

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.38
▷ Minimum class complexity3.00
▷ Maximum class complexity19.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods5096.15%
▷ Protected methods00.00%
▷ Private methods23.85%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bplugins_sdk/dist/assets/images/shield_success.png3.47KB3.61KB0.00%