78% wp-owl-carousel

Code Review | WP Owl Carousel

WordPress plugin WP Owl Carousel scored78%from 54 tests.

About plugin

  • Plugin page: wp-owl-carousel
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Mar 9, 2016
  • Number of updates: 18
  • Update frequency: every 18.3 days
  • Top authors: Dabuuker (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /10,556 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
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲0.07ms] Passed 4 tests

Analyzing server-side resources used by WP Owl Carousel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0637.19 ▼2.99
Dashboard /wp-admin3.46 ▲0.1547.30 ▼2.74
Posts /wp-admin/edit.php3.51 ▲0.1548.76 ▲1.02
Add New Post /wp-admin/post-new.php6.06 ▲0.1896.11 ▲4.99
Media Library /wp-admin/upload.php3.38 ▲0.1538.70 ▲5.07
Owl carousel /wp-admin/edit.php?post_type=wp_owl3.4235.13
Add New /wp-admin/post-new.php?post_type=wp_owl3.8949.70

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 190 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Owl Carousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲20713.81 ▼0.605.41 ▲3.5539.95 ▼3.83
Dashboard /wp-admin2,236 ▲455.86 ▲0.99101.84 ▲1.4839.59 ▼4.35
Posts /wp-admin/edit.php2,116 ▲272.04 ▼0.0140.38 ▲3.3637.59 ▲1.60
Add New Post /wp-admin/post-new.php1,577 ▲4323.42 ▲0.16641.42 ▼48.1637.06 ▼10.70
Media Library /wp-admin/upload.php1,415 ▲244.25 ▲0.03109.74 ▲2.1448.08 ▲0.81
Owl carousel /wp-admin/edit.php?post_type=wp_owl1,0771.9529.5428.62
Add New /wp-admin/post-new.php?post_type=wp_owl2,4434.1791.0546.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-owl-carousel/wp_owl_carousel.php
    • > /wp-content/plugins/wp-owl-carousel/owl_settings.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-owl-carousel/CMB2/bootstrap.php:8
    • > PHP Notice
      Undefined variable: test_root in wp-content/plugins/wp-owl-carousel/CMB2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-owl-carousel/CMB2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-owl-carousel/CMB2/example-functions.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-owl-carousel/CMB2/tests/cmb-tests-base.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-owl-carousel/CMB2/init.php:68
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-owl-carousel/CMB2/tests/cmb-tests-base.php:3
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-owl-carousel/CMB2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-owl-carousel/CMB2/tests/cmb-tests-base.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-owl-carousel/CMB2/tests/cmb-tests-base.php:3

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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: carousel, slideshow, slider, owl carousel

wp-owl-carousel/wp_owl_carousel.php 85% from 13 tests

The main PHP script in "WP Owl Carousel" version 1.1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-owl-carousel.php" instead of "wp_owl_carousel.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Everything looks great! No dangerous files found in this plugin78,645 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
XML20047,741
PO File948,83611,75220,210
PHP221,2511,8684,519
CSS59735262,262
JavaScript73891762,133
Sass9158241,069
Markdown41400378
YAML290148
JSON300118
Bourne Shell117667

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.30
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods303
▷ Static methods165.28%
▷ Public methods29396.70%
▷ Protected methods51.65%
▷ Private methods51.65%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
CMB2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
CMB2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
CMB2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%