83% wcbox-lite

Code Review | WCBox Lite - Product Slider Plugin For Woocommerce

WordPress plugin WCBox Lite - Product Slider Plugin For Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: wcbox-lite
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Oct 22, 2015
  • Latest release: Aug 17, 2016
  • Number of updates: 33
  • Update frequency: every 9.1 days
  • Top authors: im_niloy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.96ms] Passed 4 tests

Analyzing server-side resources used by WCBox Lite - Product Slider Plugin For Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.04 ▼1.49
Dashboard /wp-admin3.31 ▲0.0048.49 ▼7.33
Posts /wp-admin/edit.php3.36 ▲0.0050.59 ▲0.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.64 ▼7.48
Media Library /wp-admin/upload.php3.23 ▲0.0038.18 ▲3.90

Server storage [IO: ▲3.26MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 235 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WCBox Lite - Product Slider Plugin For Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.72 ▲0.381.75 ▼0.1643.27 ▼2.85
Dashboard /wp-admin2,205 ▲245.55 ▼0.1591.62 ▼10.3040.65 ▼2.13
Posts /wp-admin/edit.php2,117 ▲171.98 ▼0.0335.30 ▼2.7935.02 ▼5.86
Add New Post /wp-admin/post-new.php1,539 ▲1323.48 ▲0.47641.59 ▼30.0452.31 ▼5.10
Media Library /wp-admin/upload.php1,416 ▲134.29 ▲0.09102.29 ▼2.2845.12 ▲0.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 143× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wcbox-lite/vafpress-framework/config/dependencies.php on line 94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wcbox-lite/vafpress-framework/constant.php:11
    • > PHP Notice
      Undefined variable: wcbox_get_cat in wp-content/plugins/wcbox-lite/public/shortcode/wcbox_tab_widget.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/wcbox-lite/vafpress-framework/views/control/html.php:5
    • > PHP Notice
      Undefined variable: wcbox_get_cat in wp-content/plugins/wcbox-lite/public/shortcode/wcbox_tab_widget.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wcbox-lite/vafpress-framework/constant.php:11
    • > PHP Notice
      Undefined variable: wcbox_get_cat in wp-content/plugins/wcbox-lite/public/shortcode/wcbox_tab_shortcode.php on line 94
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/wcbox-lite/vafpress-framework/views/control/html.php on line 4
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/wcbox-lite/vafpress-framework/views/control/slider.php on line 1
    • > PHP Notice
      Undefined variable: wcbox_get_cat in wp-content/plugins/wcbox-lite/public/shortcode/wcbox_tab_shortcode.php on line 66

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)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (49 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (s), #2 (c)
The official readme.txt might help

wcbox-lite/wc-box.php 85% from 13 tests

This is the main PHP file of "WCBox Lite - Product Slider Plugin For Woocommerce" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wcbox-lite.php" instead of "wc-box.php")

Code Analysis 97% from 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 detected19,200 lines of code in 185 files:
LanguageFilesBlank linesComment linesLines of code
PHP1072,5242,85310,058
CSS212232244,669
JavaScript535233943,391
SVG2001,054
Markdown112027
JSON1001

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.50
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes62
▷ Abstract classes46.45%
▷ Concrete classes5893.55%
▷ Final classes00.00%
Methods525
▷ Static methods9117.33%
▷ Public methods48892.95%
▷ Protected methods193.62%
▷ Private methods183.43%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants3391.67%
▷ Class constants38.33%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 0.16MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vafpress-framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vafpress-framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
vafpress-framework/public/img/vp-sprite.png12.79KB4.90KB▼ 61.71%
vafpress-framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
vafpress-framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%