78% post-carousel-slider-for-visual-composer

Code Review | Post Slider For WPBakery Page Builder

WordPress plugin Post Slider For WPBakery Page Builder scored 78% from 54 tests.

About plugin

  • Plugin page: post-carousel-sli...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Nov 17, 2017
  • Latest release: Sep 27, 2022
  • Number of updates: 34
  • Update frequency: every 52.2 days
  • Top authors: nasir179125 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 23,073 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Post Slider For WPBakery Page Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.27 ▼3.88
Dashboard /wp-admin3.32 ▲0.0146.38 ▼1.51
Posts /wp-admin/edit.php3.37 ▲0.0144.33 ▼1.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.67 ▼15.41
Media Library /wp-admin/upload.php3.24 ▲0.0137.05 ▲2.56

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Post Slider For WPBakery Page Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.17 ▼1.201.67 ▼0.2042.25 ▼2.42
Dashboard /wp-admin2,223 ▲355.86 ▼0.2099.37 ▼6.7139.94 ▼2.52
Posts /wp-admin/edit.php2,106 ▲171.98 ▼0.0734.26 ▼0.3833.68 ▼0.18
Add New Post /wp-admin/post-new.php1,546 ▲1723.22 ▲4.89612.55 ▼23.1549.75 ▼0.85
Media Library /wp-admin/upload.php1,408 ▲204.22 ▲0.08100.94 ▲0.2643.24 ▲0.54

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-carousel-slider-for-visual-composer/render/post_slider.php
    • > /wp-content/plugins/post-carousel-slider-for-visual-composer/render/post_grid.php
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style5.php on line 3
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style6.php on line 3
    • > PHP Notice
      Undefined variable: img_padding in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style4.php on line 1
    • > PHP Notice
      Undefined variable: css_class in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style3.php on line 2
    • > PHP Notice
      Undefined variable: img_padding in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style9.php on line 1
    • > PHP Notice
      Undefined variable: img_padding in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style6.php on line 1
    • > PHP Notice
      Undefined variable: grid in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style7.php on line 1
    • > PHP Notice
      Undefined variable: css_class in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style7.php on line 2
    • > PHP Notice
      Undefined variable: img_padding in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style7.php on line 1
    • > PHP Notice
      Undefined variable: img_padding in wp-content/plugins/post-carousel-slider-for-visual-composer/render/includes/style3.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

post-carousel-slider-for-visual-composer/index.php 92% from 13 tests

The entry point to "Post Slider For WPBakery Page Builder" version 1.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 ("post-carousel-slider-for-visual-composer.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
Success! There were no dangerous files found in this plugin7,329 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,690
JavaScript3850542,174
CSS4146611,587
PHP136933878

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity10.67
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods228.57%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/carousal-slider.png2.62KB1.75KB▼ 33.06%
icons/post-carousel.png2.55KB1.69KB▼ 33.52%