89% product-videos-for-woocommerce

Code Review | Product Videos for Woocommerce

WordPress plugin Product Videos for Woocommerce scored 89% from 54 tests.

About plugin

  • Plugin page: product-videos-fo...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2019
  • Latest release: May 15, 2020
  • Number of updates: 18
  • Update frequency: every 16.5 days
  • Top authors: repupress (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active / 12,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Product Videos for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.96 ▼6.04
Dashboard /wp-admin3.33 ▲0.0350.48 ▲1.54
Posts /wp-admin/edit.php3.38 ▲0.0345.66 ▲1.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.53 ▼10.23
Media Library /wp-admin/upload.php3.26 ▲0.0334.82 ▲1.28
Automations /wp-admin/admin.php?page=api-pv-automations3.3432.35

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 11 new options
New WordPress options
api_pv_automation_count
can_compress_scripts
theysaidso_admin_options
api_pv_automation_all
widget_recent-posts
db_upgraded
api_pv_automation_products_per
widget_theysaidso_widget
api_pv_product_store_count
widget_recent-comments
...

Browser metrics Passed 4 tests

Product Videos for Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11313.32 ▼1.061.96 ▼0.0139.85 ▼4.38
Dashboard /wp-admin2,229 ▲415.83 ▲0.9895.72 ▼24.4035.97 ▼8.98
Posts /wp-admin/edit.php2,112 ▲232.06 ▼0.1034.90 ▲0.4331.01 ▼1.95
Add New Post /wp-admin/post-new.php1,552 ▲3823.16 ▲5.55668.37 ▲12.5752.81 ▼7.30
Media Library /wp-admin/upload.php1,411 ▲204.20 ▼0.01105.35 ▲6.2351.76 ▲5.02
Automations /wp-admin/admin.php?page=api-pv-automations9932.0428.0829.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_recent-posts
    • api_pv_product_store_count
    • api_pv_automation_products_per
    • api_pv_automation_count
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • api_pv_total_products_start
    • api_pv_automation_all
    • theysaidso_admin_options
    • ...

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

product-videos-for-woocommerce/product-videos-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Product Videos for Woocommerce" version 2.1.0
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Description: The description should be shorter than 140 characters (currently 209 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,238 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP152092273,238

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/video-icon.png1.80KB1.66KB▼ 7.91%