78% owl-carousel-wp

Code Review | Owl Carousel WP

WordPress plugin Owl Carousel WP scored78%from 54 tests.

About plugin

  • Plugin page: owl-carousel-wp
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2015
  • Latest release: May 15, 2020
  • Number of updates: 70
  • Update frequency: every 23.4 days
  • Top authors: imranemu (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /57,523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼1.03ms] Passed 4 tests

Server-side resources used by Owl Carousel WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1944.04 ▲4.87
Dashboard /wp-admin3.68 ▲0.2958.16 ▼10.00
Posts /wp-admin/edit.php3.73 ▲0.3362.25 ▲10.21
Add New Post /wp-admin/post-new.php6.18 ▲0.2590.08 ▼2.47
Media Library /wp-admin/upload.php3.51 ▲0.2442.36 ▲3.49
Carousel Settings /wp-admin/edit.php?post_type=ocw_carousel&page=carousel-settings3.5140.91
Add New Carousel /wp-admin/post-new.php?post_type=ocw_carousel3.5950.09
Help & Upgrade /wp-admin/edit.php?post_type=ocw_carousel&page=tc_ocw_carousel_menu_help3.5138.20
All Carousels /wp-admin/edit.php?post_type=ocw_carousel3.5853.01
Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=ocw_carousel3.5340.79

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 9 new options
New WordPress options
tc-owlcarousel_others
tc-owlcarousel_basics
theysaidso_admin_options
tc-owlcarousel_advanced
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Owl Carousel WP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲31615.17 ▲0.896.45 ▲4.9543.85 ▼0.45
Dashboard /wp-admin2,374 ▲1976.30 ▲0.62110.92 ▲22.0298.16 ▲52.62
Posts /wp-admin/edit.php2,320 ▲2203.53 ▲1.5755.00 ▲18.2183.65 ▲47.94
Add New Post /wp-admin/post-new.php1,584 ▲5718.45 ▼4.58613.69 ▼41.68194.03 ▲136.30
Media Library /wp-admin/upload.php1,457 ▲634.39 ▲0.2192.95 ▼9.4590.65 ▲43.24
Carousel Settings /wp-admin/edit.php?post_type=ocw_carousel&page=carousel-settings1,8453.9077.8369.24
Add New Carousel /wp-admin/post-new.php?post_type=ocw_carousel2,0003.7873.37111.41
Help & Upgrade /wp-admin/edit.php?post_type=ocw_carousel&page=tc_ocw_carousel_menu_help1,71410.27296.8792.04
All Carousels /wp-admin/edit.php?post_type=ocw_carousel1,3223.5244.6967.32
Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=ocw_carousel1,4883.3341.5873.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • tc-owlcarousel_basics
    • tc-owlcarousel_others
    • can_compress_scripts
    • widget_theysaidso_widget
    • tc-owlcarousel_advanced
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/owl-carousel-wp/lib/tc-ocw_carousel-help-upgrade.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/owl-carousel-wp/owl-carousel-wp.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/owl-carousel-wp/public/view.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/owl-carousel-wp/lib/tc_exlink.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/owl-carousel-wp/lib/cpt.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/owl-carousel-wp/lib/tc-owlcarousel-column.php: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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: carousel, post carousel, carousel slider wordpress, wordpress image carousel, image carousel...

owl-carousel-wp/owl-carousel-wp.php 92% from 13 tests

The principal PHP file in "Owl Carousel WP" v. 2.2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 363 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,428 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24508571,764
PHP92582601,012
CSS73762582
Markdown138070

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons.png0.55KB0.32KB▼ 42.86%
vendors/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%