77% wip-woocarousel-lite

Code Review | WIP WooCarousel Lite

WordPress plugin WIP WooCarousel Lite scored77%from 54 tests.

About plugin

  • Plugin page: wip-woocarousel-lite
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2016
  • Latest release: Sep 22, 2023
  • Number of updates: 42
  • Update frequency: every 60.8 days
  • Top authors: alexvtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /34,880 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
Install script ran successfully

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

Server-side resources used by WIP WooCarousel Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1135.32 ▼3.72
Dashboard /wp-admin3.43 ▲0.0845.36 ▼13.54
Posts /wp-admin/edit.php3.54 ▲0.1851.65 ▲4.02
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.73 ▲0.89
Media Library /wp-admin/upload.php3.35 ▲0.1234.34 ▲0.77
WooCarousel Lite /wp-admin/admin.php?page=wip_woocarousel_lite_panel3.3231.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WIP WooCarousel Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.86 ▼0.708.76 ▲7.1729.73 ▼9.58
Dashboard /wp-admin2,233 ▲565.51 ▼0.0382.59 ▼2.6279.21 ▲39.40
Posts /wp-admin/edit.php2,142 ▲422.09 ▲0.0639.29 ▲5.3538.41 ▲0.61
Add New Post /wp-admin/post-new.php1,565 ▲3922.93 ▼0.03688.20 ▲34.4851.29 ▼5.07
Media Library /wp-admin/upload.php1,438 ▲354.16 ▼0.0292.03 ▼12.7778.37 ▲33.19
WooCarousel Lite /wp-admin/admin.php?page=wip_woocarousel_lite_panel9222.1729.82104.01

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wip-woocarousel-lite/init.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wip-woocarousel-lite/core/admin/panel.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wip-woocarousel-lite/shortcode/products_carousel.php:129

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=wip_woocarousel_lite_panel
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).wpColorPicker is not a function" "TypeError: $(...).wpColorPicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wip-woocarousel-lite/core/assets/js/panel.js?ver=1.0:7:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=wip_woocarousel_lite_panel
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).wpColorPicker is not a function

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (22 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 (Product slider in your page.)
Please take inspiration from this readme.txt

wip-woocarousel-lite/init.php 85% from 13 tests

"WIP WooCarousel Lite" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wip-woocarousel-lite.php" instead of "init.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.5.0" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected2,337 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS616934992
SVG103534
PHP6413111533
JavaScript59444225
PO File17851,76253

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.67
▷ Minimum class complexity3.00
▷ Maximum class complexity58.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/subparent-hover.png0.92KB0.11KB▼ 88.24%
assets/images/logo.png6.46KB3.00KB▼ 53.49%
core/assets/images/tip-icon.png1.23KB0.36KB▼ 70.85%
core/assets/images/tip-logo.png9.73KB4.36KB▼ 55.18%
core/assets/images/subparent.png0.95KB0.11KB▼ 88.16%