89% woocommerce-video-product-tab

Code Review | WooCommerce Video Product Tab

WordPress plugin WooCommerce Video Product Tab scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-video...
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 29, 2012
  • Latest release: Jun 13, 2013
  • Number of updates: 33
  • Update frequency: every 24.9 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

600+ active /39,909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.11ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Video Product Tab
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.40 ▼3.87
Dashboard /wp-admin3.31 ▼0.0345.20 ▼15.58
Posts /wp-admin/edit.php3.36 ▲0.0046.88 ▼0.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.78 ▼20.30
Media Library /wp-admin/upload.php3.23 ▲0.0036.31 ▲2.82

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Video Product Tab: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.24 ▼1.134.45 ▲2.3541.68 ▼1.65
Dashboard /wp-admin2,200 ▲125.79 ▼0.12106.63 ▼2.4241.69 ▼4.41
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.77 ▲1.9135.83 ▲0.28
Add New Post /wp-admin/post-new.php1,514 ▼517.57 ▼5.54687.02 ▲60.2554.65 ▼4.38
Media Library /wp-admin/upload.php1,385 ▼04.18 ▼0.0195.55 ▼5.4340.56 ▼2.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% 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 do not have images: #1 (Product Page with a Video added.), #2 (How to add a video for your product.)
The official readme.txt is a good inspiration

woocommerce-video-product-tab/woocommerce-video-tab.php 69% from 13 tests

The principal PHP file in "WooCommerce Video Product Tab" v. 2.3.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-video-product-tab.php" instead of "woocommerce-video-tab.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.3" instead of "3.1")
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected273 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14385228
PO File194645

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.45
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.31MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png14.40KB9.53KB▼ 33.82%
screenshot-1.png303.56KB88.64KB▼ 70.80%
play.png2.94KB0.24KB▼ 91.86%