Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.24ms] Passed 4 tests
A check of server-side resources used by Document Preview For WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 40.86 ▼6.13 |
Dashboard /wp-admin | 3.31 ▲0.00 | 50.76 ▼3.72 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 50.83 ▼2.49 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 96.36 ▼0.62 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.74 ▼0.03 |
Our Plugins /wp-admin/admin.php?page=wbcom-plugins-page | 3.00 | 24.36 |
Support /wp-admin/admin.php?page=wbcom-support-page | 3.00 | 24.33 |
Woo Document Preview /wp-admin/admin.php?page=woo-document-preview-settings | 3.00 | 23.72 |
Our Themes /wp-admin/admin.php?page=wbcom-themes-page | 3.00 | 25.51 |
Server storage [IO: ▲0.88MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Document Preview For WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.08 ▼0.29 | 1.78 ▼0.38 | 41.11 ▼3.73 |
Dashboard /wp-admin | 2,192 ▲12 | 5.61 ▼0.05 | 93.40 ▼9.45 | 41.14 ▼3.50 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 1.97 ▼0.06 | 38.80 ▲2.52 | 35.20 ▲0.51 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.52 ▲0.46 | 641.45 ▼70.35 | 58.60 ▲0.53 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.20 ▼0.03 | 96.13 ▼9.32 | 43.30 ▼1.42 |
Our Plugins /wp-admin/admin.php?page=wbcom-plugins-page | 28 | 0.42 | 0.08 | 4.49 |
Support /wp-admin/admin.php?page=wbcom-support-page | 28 | 0.42 | 0.06 | 5.00 |
Woo Document Preview /wp-admin/admin.php?page=woo-document-preview-settings | 28 | 0.42 | 0.09 | 4.28 |
Our Themes /wp-admin/admin.php?page=wbcom-themes-page | 28 | 0.42 | 0.07 | 3.57 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woo-document-preview/admin/wbcom/templates/wbcom-plugins-page.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-document-preview/admin/class-wc-document-preview-admin-feedback.php:311
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woo-document-preview/admin/wbcom/templates/wbcom-support-page.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-document-preview/admin/partials/woo-document-preview-general-pro.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woo-document-preview/admin/wbcom/templates/wbcom-license-page.php:5
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
- > GET request to /wp-admin/admin.php?page=wbcom-plugins-page
- > Network (severe)
wp-admin/admin.php?page=wbcom-plugins-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
- > GET request to /wp-admin/admin.php?page=wbcom-support-page
- > Network (severe)
wp-admin/admin.php?page=wbcom-support-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
- > GET request to /wp-admin/admin.php?page=woo-document-preview-settings
- > Network (severe)
wp-admin/admin.php?page=woo-document-preview-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
- > GET request to /wp-admin/admin.php?page=wbcom-themes-page
- > Network (severe)
wp-admin/admin.php?page=wbcom-themes-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
- Screenshots: Add images for these screenshots: #1 (The screenshot shows the doc preview of sample pdf file and corresponds to screenshot-1.(png|jpg|jpeg|gif).), #2 (The screenshot shows the button on the single product page to preview the doc and corresponds to screenshot-2.(png|jpg|jpeg|gif).), #3 (The screenshot shows the metabox on product edit page to manage the docs to preview and corresponds to screenshot-3.(png|jpg|jpeg|gif).)
woo-document-preview/woo-product-document-preview.php 77% from 13 tests
"Document Preview For WooCommerce" version 1.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-document-preview.php" instead of "woo-product-document-preview.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,931 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 6,159 |
CSS | 3 | 320 | 64 | 1,783 |
PHP | 18 | 221 | 855 | 1,754 |
JavaScript | 4 | 12 | 83 | 235 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 13.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 2.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 60 | |
▷ Static methods | 2 | 3.33% |
▷ Public methods | 54 | 90.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 10.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 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
6 PNG files occupy 0.30MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/wbcom/assets/imgs/logowbcom.png | 10.12KB | 3.87KB | ▼ 61.72% |
admin/wbcom/assets/imgs/wbcom-offer-notice.png | 67.64KB | 32.40KB | ▼ 52.11% |
screenshot-2.png | 22.84KB | 9.94KB | ▼ 56.49% |
screenshot-3.png | 9.19KB | 4.51KB | ▼ 50.95% |
screenshot-1.png | 186.64KB | 76.52KB | ▼ 59.00% |