90% wpc-product-videos

Code Review | WPC Product Videos for WooCommerce

WordPress plugin WPC Product Videos for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-product-videos
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Oct 2, 2023
  • Number of updates: 16
  • Update frequency: every 58.6 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /11,522 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.14ms] Passed 4 tests

This is a short check of server-side resources used by WPC Product Videos for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1146.13 ▲12.07
Dashboard /wp-admin3.42 ▲0.1148.67 ▼2.01
Posts /wp-admin/edit.php3.53 ▲0.1843.45 ▼4.66
Add New Post /wp-admin/post-new.php6.02 ▲0.1379.42 ▼8.93
Media Library /wp-admin/upload.php3.34 ▲0.1141.00 ▲7.04
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.5230.17
About /wp-admin/admin.php?page=wpclever3.3128.41

Server storage [IO: ▲1.07MB] [DB: ▲0.02MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by WPC Product Videos for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.29 ▼0.091.79 ▲0.1444.13 ▲4.33
Dashboard /wp-admin2,258 ▲875.61 ▲0.0489.70 ▲0.8382.07 ▲38.31
Posts /wp-admin/edit.php2,176 ▲732.03 ▼0.0134.94 ▼2.0132.73 ▼1.26
Add New Post /wp-admin/post-new.php1,752 ▲22422.32 ▼0.84732.41 ▲63.0954.12 ▲3.34
Media Library /wp-admin/upload.php1,469 ▲724.23 ▼0.0296.64 ▼2.4370.04 ▲25.61
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7422.1631.9357.45
About /wp-admin/admin.php?page=wpclever1,3942.1432.4235.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

wpc-product-videos/wpc-product-videos.php Passed 13 tests

The primary PHP file in "WPC Product Videos for WooCommerce" version 1.1.0 is used by WordPress to initiate all plugin functionality
117 characters long description:
WPC Product Videos helps you add many videos for a product and linked to the feature image or product gallery images.

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
There were no executable files found in this plugin7,538 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript79844533,677
CSS10421192,430
SVG400875
PHP48928556

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/libs/lightgallery/img/youtube-play.png5.06KB2.37KB▼ 53.04%
assets/libs/lightgallery/img/video-play.png4.42KB1.05KB▼ 76.27%
assets/libs/lightgallery/img/vimeo-play.png5.30KB1.56KB▼ 70.65%