94% video-tab-for-woocommerce

Code Review | Video Tab For WooCommerce

WordPress plugin Video Tab For WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: video-tab-for-woo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.5
  • WordPress version: 5.8.1
  • First release: Apr 28, 2018
  • Latest release: Apr 28, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: promenadepro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active / 34,740 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼140.84ms] Passed 4 tests

An overview of server-side resources used by Video Tab For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.06 ▲5.42
Dashboard /wp-admin3.09 ▲0.0445.34 ▼3.25
Posts /wp-admin/edit.php3.15 ▲0.0446.17 ▲2.08
Add New Post /wp-admin/post-new.php5.45 ▲0.0293.91 ▼556.27
Media Library /wp-admin/upload.php3.04 ▲0.0428.28 ▼5.91

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Video Tab For WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,696 ▲9116.02 ▲0.419.86 ▲1.1845.56 ▼3.29
Dashboard /wp-admin2,984 ▲475.93 ▼0.24142.61 ▼38.37111.15 ▲5.90
Posts /wp-admin/edit.php2,756 ▲172.72 ▲0.0168.83 ▼1.1386.85 ▼0.11
Add New Post /wp-admin/post-new.php1,684 ▼1,89318.83 ▲4.00388.95 ▼131.06106.59 ▼5.00
Media Library /wp-admin/upload.php1,826 ▲45.04 ▲0.04151.38 ▲3.92116.59 ▲0.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/video-tab-for-woocommerce/custom-video-tab/video-tab-front.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/video-tab-for-woocommerce/custom-video-tab/video-tab-admin.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Backend View), #2 (Frontend View)
You can take inspiration from this readme.txt

video-tab-for-woocommerce/video-tab-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Video Tab For WooCommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 344 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin184 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47739184

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png82.34KB36.44KB▼ 55.75%
screenshot-1.png59.18KB23.98KB▼ 59.48%