10% wb-carousel

Code Review | Carousel

WordPress plugin Carousel scored10%from 54 tests.

About plugin

  • Plugin page: wb-carousel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: Nov 7, 2017
  • Number of updates: 10
  • Update frequency: every 27.9 days
  • Top authors: wpbrim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,339 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+312
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wpbrim_carousel_activation_redirect' not found or invalid function name

Server metrics [RAM: ▲0.11MB] [CPU: ▲1.49ms] Passed 4 tests

An overview of server-side resources used by Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0638.35 ▼1.00
Dashboard /wp-admin3.49 ▲0.1948.38 ▼6.45
Posts /wp-admin/edit.php3.54 ▲0.1857.67 ▲11.97
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.26 ▲3.91
Media Library /wp-admin/upload.php3.32 ▲0.0943.23 ▲9.51
Help & Upgrade /wp-admin/edit.php?post_type=wb_carousel&page=wpbrim_carousel_menu_help3.3435.42
Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=wb_carousel3.3437.39
All Carousels /wp-admin/edit.php?post_type=wb_carousel3.3939.88
Add New Carousel /wp-admin/post-new.php?post_type=wb_carousel3.4046.14
Carousel Settings /wp-admin/edit.php?post_type=wb_carousel&page=carousel-settings3.3238.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
wb_carousel_basics
can_compress_scripts
widget_recent-comments
wb_carousel_others
wb_carousel_advanced
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Carousel: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,117 ▲38215.71 ▲0.916.24 ▲4.4142.31 ▼6.94
Dashboard /wp-admin2,403 ▲2126.62 ▲0.63134.07 ▲15.3283.41 ▲38.94
Posts /wp-admin/edit.php2,309 ▲2233.62 ▲1.6457.50 ▲21.5969.84 ▲34.51
Add New Post /wp-admin/post-new.php1,719 ▲18622.75 ▼0.55576.29 ▼20.1831.38 ▼21.72
Media Library /wp-admin/upload.php1,448 ▲604.26 ▲0.0380.56 ▼14.3782.19 ▲36.36
Help & Upgrade /wp-admin/edit.php?post_type=wb_carousel&page=wpbrim_carousel_menu_help1,0003.2140.9168.86
Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=wb_carousel1,4763.2845.6575.71
All Carousels /wp-admin/edit.php?post_type=wb_carousel1,3063.4646.9469.72
Add New Carousel /wp-admin/post-new.php?post_type=wb_carousel1,7263.9463.9591.27
Carousel Settings /wp-admin/edit.php?post_type=wb_carousel&page=carousel-settings1,7963.8778.2968.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
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • wb_carousel_others
    • db_upgraded
    • theysaidso_admin_options
    • wb_carousel_advanced
    • widget_recent-posts
    • widget_recent-comments
    • wb_carousel_basics
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wb-carousel/lib/wb-carousel-help-upgrade.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wb-carousel/public/view.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wb-carousel/wb-carousel.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wb-carousel/lib/cpt.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wb-carousel/lib/wb-carousel-column.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Final output after adding shortcode from)
The official readme.txt might help

wb-carousel/wb-carousel.php 92% from 13 tests

This is the main PHP file of "Carousel" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 272 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,206 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24508571,764
PHP8227213790
CSS73762582
Markdown138070

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity26.00
▷ Minimum class complexity3.00
▷ Maximum class complexity49.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
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
vendors/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%
assets/images/icons.png1.10KB0.22KB▼ 79.88%