Benchmarks
Plugin footprint Passed 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.06MB] [CPU: ▼142.24ms] Passed 4 tests
Analyzing server-side resources used by WC Product Videos
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.90 ▲0.07 | 31.73 ▼1.16 |
Dashboard /wp-admin | 3.12 ▲0.06 | 47.32 ▲0.58 |
Posts /wp-admin/edit.php | 3.23 ▲0.12 | 41.86 ▼2.56 |
Add New Post /wp-admin/post-new.php | 5.48 ▲0.04 | 88.11 ▼565.82 |
Media Library /wp-admin/upload.php | 3.06 ▲0.06 | 35.06 ▲2.81 |
Server storage [IO: ▲0.36MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by WC Product Videos
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,816 ▲220 | 16.66 ▲1.12 | 15.27 ▲4.89 | 45.57 ▼0.31 |
Dashboard /wp-admin | 2,977 ▲43 | 6.13 ▲0.24 | 166.23 ▲14.09 | 111.40 ▲3.65 |
Posts /wp-admin/edit.php | 2,740 ▲1 | 2.72 ▼0.00 | 68.97 ▲1.46 | 84.61 ▼1.25 |
Add New Post /wp-admin/post-new.php | 1,619 ▼64 | 21.34 ▲2.60 | 285.97 ▼100.58 | 105.44 ▼2.22 |
Media Library /wp-admin/upload.php | 1,811 ▲4 | 5.05 ▲0.05 | 141.96 ▼16.75 | 110.25 ▼11.37 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wc-product-videos/admin/partials/woocommerce-product-videos-admin-display.php
- > /wp-content/plugins/wc-product-videos/public/partials/woocommerce-product-videos-public-display.php
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 errors were detected
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Plugin Name: Please specify the plugin name on the first line (
=== wc-product-videos ===
) - Screenshots: These screenshots have no corresponding images in /assets: #1 (Product page showing the main product image replaced with an embedded YouTube video), #2 (Product video admin entry on the edit product page allowing selection of video and position)
wc-product-videos/wc-product-videos.php 85% from 13 tests
"WC Product Videos" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "2.2")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected237 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 130 | 539 | 231 |
JavaScript | 2 | 4 | 54 | 6 |
CSS | 2 | 0 | 8 | 0 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.11 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 28 | |
▷ Static methods | 2 | 7.14% |
▷ Public methods | 23 | 82.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 17.86% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
2 PNG files occupy 0.31MB with 0.21MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 182.51KB | 60.13KB | ▼ 67.06% |
screenshot-2.png | 136.79KB | 45.77KB | ▼ 66.54% |