89% dd-post-carousel

Code Review | Custom Post Carousels with Owl

WordPress plugin Custom Post Carousels with Owl scored89%from 54 tests.

About plugin

  • Plugin page: dd-post-carousel
  • Plugin version: 1.4.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 24, 2018
  • Latest release: Oct 11, 2023
  • Number of updates: 57
  • Update frequency: every 32.9 days
  • Top authors: thehowarde (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

2,000+ active /25,215 total downloads

Benchmarks

Plugin footprint 83% 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.46MB] [CPU: ▼6.67ms] Passed 4 tests

An overview of server-side resources used by Custom Post Carousels with Owl
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4742.95 ▲2.46
Dashboard /wp-admin3.78 ▲0.4349.04 ▼12.64
Posts /wp-admin/edit.php3.89 ▲0.5344.94 ▲0.14
Add New Post /wp-admin/post-new.php6.39 ▲0.5080.85 ▼16.64
Media Library /wp-admin/upload.php3.70 ▲0.4740.12 ▲6.99
All Carousels /wp-admin/edit.php?post_type=owl-carousel3.7437.76
Add New /wp-admin/post-new.php?post_type=owl-carousel3.7748.18

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Custom Post Carousels with Owl: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.39 ▼0.231.92 ▲0.3148.04 ▲9.25
Dashboard /wp-admin2,229 ▲495.80 ▲0.2098.18 ▲13.5941.55 ▼2.75
Posts /wp-admin/edit.php2,131 ▲312.26 ▲0.2834.64 ▼3.4533.38 ▼4.46
Add New Post /wp-admin/post-new.php1,553 ▲2523.72 ▲0.54663.50 ▼11.3468.96 ▲14.31
Media Library /wp-admin/upload.php1,434 ▲344.47 ▲0.33110.10 ▲11.5145.29 ▲0.47
All Carousels /wp-admin/edit.php?post_type=owl-carousel1,1112.4030.9628.02
Add New /wp-admin/post-new.php?post_type=owl-carousel3,1414.2479.9139.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: post carousel, reviews carousel, owl carousel 2, post slider, product slider...

dd-post-carousel/owl-carousel-2.php 69% from 13 tests

The primary PHP file in "Custom Post Carousels with Owl" version 1.4.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "3.0.0")
  • Description: The description should be shorter than 140 characters (currently 160 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dd-post-carousel.php" instead of "owl-carousel-2.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,277 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP132997741,788
JavaScript783130778
CSS1282123711

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity25.91
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity6.07
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods54
▷ Static methods59.26%
▷ Public methods4583.33%
▷ Protected methods00.00%
▷ Private methods916.67%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
admin/css/images/wpicons-2x.png14.58KB14.60KB0.00%
public/css/owl.video.play.png4.86KB2.74KB▼ 43.61%
admin/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
admin/css/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%