73% vg-woocarousel

Code Review | VG WooCarousel

WordPress plugin VG WooCarousel scored73%from 54 tests.

About plugin

  • Plugin page: vg-woocarousel
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Nov 18, 2015
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: vinagecko (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /4,603 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼0.36ms] Passed 4 tests

An overview of server-side resources used by VG WooCarousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1935.82 ▼1.79
Dashboard /wp-admin3.52 ▲0.2250.55 ▲1.28
Posts /wp-admin/edit.php3.63 ▲0.2747.30 ▼1.21
Add New Post /wp-admin/post-new.php6.08 ▲0.1991.17 ▲9.99
Media Library /wp-admin/upload.php3.42 ▲0.1935.38 ▲0.29
VG New Carousel /wp-admin/post-new.php?post_type=vgwc3.4442.20
VG WooCarousel /wp-admin/edit.php?post_type=vgwc3.4945.98
About VGWC /wp-admin/edit.php?post_type=vgwc&page=vgwc_menu_settings3.4134.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for VG WooCarousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,074 ▲32815.39 ▲1.015.17 ▲3.4739.55 ▼3.60
Dashboard /wp-admin2,371 ▲1836.77 ▲1.89138.29 ▲34.4288.30 ▲44.65
Posts /wp-admin/edit.php2,289 ▲2003.82 ▲1.8348.83 ▲14.0283.78 ▲52.05
Add New Post /wp-admin/post-new.php1,565 ▲5123.19 ▲5.52575.00 ▼136.8095.60 ▲34.65
Media Library /wp-admin/upload.php1,434 ▲464.41 ▲0.1579.80 ▼17.9381.44 ▲34.97
VG New Carousel /wp-admin/post-new.php?post_type=vgwc1,9581.7313.3256.03
VG WooCarousel /wp-admin/edit.php?post_type=vgwc1,2593.5347.2973.68
About VGWC /wp-admin/edit.php?post_type=vgwc&page=vgwc_menu_settings1,1373.2842.3166.37

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 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • vgwc_version
    • can_compress_scripts
    • vgwc_customer_type
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Warning in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+35
    scandir(wp-content/themes/twentytwentyone/vgwc-themes): failed to open dir: No such file or directory
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Warning in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+35
    scandir(): (errno 2): No such file or directory
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Warning in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+37
    Invalid argument supplied for foreach()
  • 20292 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Notice in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+8
    Trying to get property 'slug' of non-object
  • 10145 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Notice in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+8
    Trying to get property 'name' of non-object
  • 10145 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Notice in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+8
    Undefined variable: return
  • 10145 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Notice in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+9
    Trying to get property 'term_id' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=vgwc
    • > Error in wp-content/plugins/vg-woocarousel/includes/vgwc-functions.php+8
    Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/vg-woocarousel/vgwc-settings.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vg-woocarousel/includes/vgwc-meta.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === vg-woocarousel === )
The official readme.txt might help

vg-woocarousel/vg-woocarousel.php Passed 13 tests

Analyzing the main PHP file in "VG WooCarousel" version 1.3
114 characters long description:
Products Carousel for WooCommerce. You can set unlimited carousel anywhere via short-codes and easy admin setting.

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
There were no executable files found in this plugin2,805 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3209171,303
PHP5295411,186
CSS41519316

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/icon-carousel.png2.78KB0.11KB▼ 96.10%