73% wp-touch-slider

Code Review | OWL Carousel Slider

WordPress plugin OWL Carousel Slider scored73%from 54 tests.

About plugin

  • Plugin page: wp-touch-slider
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Mar 5, 2016
  • Latest release: Apr 30, 2020
  • Number of updates: 66
  • Update frequency: every 23.0 days
  • Top authors: wp-buy (98.48%)osamaesh (3.03%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /11,785 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.66ms] Passed 4 tests

A check of server-side resources used by OWL Carousel Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2338.24 ▼3.91
Dashboard /wp-admin3.53 ▲0.2348.74 ▼7.41
Posts /wp-admin/edit.php3.64 ▲0.2952.20 ▼0.77
Add New Post /wp-admin/post-new.php6.11 ▲0.23100.72 ▲1.44
Media Library /wp-admin/upload.php3.45 ▲0.2348.15 ▲6.89
Add New /wp-admin/admin.php?page=wpoc_edit3.5346.25
/wp-admin/admin.php?page=wpoc_save3.4250.50
OWL Carousel /wp-admin/admin.php?page=wpoc_sliders3.4335.37

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 559 new files
Database: 2 new tables, 8 new options
New tables
wp_wpoc_sliders
wp_wpoc_slides
New WordPress options
widget_recent-posts
widget_wpoc_slider_widget
can_compress_scripts
wpoc_slider_settings
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for OWL Carousel Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.70 ▼0.861.60 ▼0.3842.40 ▲0.71
Dashboard /wp-admin2,232 ▲445.83 ▼0.0296.52 ▼6.3638.35 ▼4.28
Posts /wp-admin/edit.php2,118 ▲262.02 ▼0.0340.07 ▼4.7736.52 ▼3.82
Add New Post /wp-admin/post-new.php1,436 ▼9217.77 ▼5.40904.17 ▲204.7355.04 ▼1.12
Media Library /wp-admin/upload.php1,414 ▲234.17 ▼0.07127.54 ▲29.9061.68 ▲19.62
Add New /wp-admin/admin.php?page=wpoc_edit1,9364.2194.76124.56
/wp-admin/admin.php?page=wpoc_save7722.0324.8321.96
OWL Carousel /wp-admin/admin.php?page=wpoc_sliders8881.9225.7229.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_wpoc_sliders
    • wp_wpoc_slides
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wpoc_slider_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpoc_render_slider() in wp-content/plugins/wp-touch-slider/views/slider-preview.php:3
    • > PHP Notice
      Undefined variable: sdr_id in wp-content/plugins/wp-touch-slider/views/slider-options.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/wp-touch-slider/views/sliders-view.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-touch-slider/views/slider.php:14
    • > PHP Notice
      Undefined variable: slides in wp-content/plugins/wp-touch-slider/views/slider-slides.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-touch-slider/views/slider-options.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-touch-slider/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-touch-slider/views/slider-slides.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (slider sample), #2 (options & configurations), #3 (more demos)
The official readme.txt is a good inspiration

wp-touch-slider/wpoc_slider.php 92% from 13 tests

The entry point to "OWL Carousel Slider" version 2.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-touch-slider.php" instead of "wpoc_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin111,091 lines of code in 505 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2266,2974,26150,608
CSS9951463942,862
HTML1212,418812,762
PHP132304002,427
LESS352363591,100
SVG200943
PO File19295201
Markdown4530102
JSON30080
YAML1006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.55MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/labtop_64.png0.37KB0.34KB▼ 9.42%
images/upgradenow-button.png44.94KB13.71KB▼ 69.49%
images/alert_24.png1.47KB1.51KB0.00%
images/mobile_64.png0.45KB0.39KB▼ 13.12%
screenshot-2.png267.39KB86.55KB▼ 67.63%