Benchmarks
Plugin footprint 83% from 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: ▼4.09ms] Passed 4 tests
Analyzing server-side resources used by Product Discount Flyer for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 41.18 ▲1.77 |
Dashboard /wp-admin | 3.33 ▲0.03 | 45.08 ▼1.92 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 46.86 ▲1.09 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 95.06 ▼16.97 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 35.65 ▲1.44 |
Flyer Settings /wp-admin/admin.php?page=flyer-settings | 3.22 | 32.62 |
Server storage [IO: ▲3.06MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Product Discount Flyer for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,812 ▲77 | 13.16 ▼1.40 | 2.42 ▲0.51 | 44.23 ▲0.60 |
Dashboard /wp-admin | 2,213 ▲25 | 5.88 ▲1.00 | 95.62 ▼11.89 | 40.24 ▼2.09 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.00 ▲0.03 | 39.44 ▲2.18 | 33.71 ▲1.13 |
Add New Post /wp-admin/post-new.php | 1,530 ▲7 | 18.20 ▼4.98 | 590.16 ▼97.98 | 53.24 ▲3.15 |
Media Library /wp-admin/upload.php | 1,395 ▲10 | 4.27 ▲0.06 | 92.09 ▼9.07 | 41.71 ▲0.04 |
Flyer Settings /wp-admin/admin.php?page=flyer-settings | 790 | 2.05 | 24.62 | 23.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 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
Please take a closer look at the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/woo-product-discount-flyer/includes/tcpdf/tools/tcpdf_addfont.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 90% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Screenshots: Add images for these screenshots: #1 (Flyer Settings Page), #2 (WooCommerce Order Page)
woo-product-discount-flyer/woocommerce-flyer.php 85% from 13 tests
The main PHP script in "Product Discount Flyer for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("woo-product-discount-flyer.php" instead of "woocommerce-flyer.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 254 characters long)
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin46,864 lines of code in 39 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 27 | 1,481 | 11,634 | 46,579 |
XML | 6 | 0 | 0 | 96 |
Markdown | 1 | 21 | 0 | 63 |
JSON | 1 | 0 | 0 | 47 |
CSS | 2 | 0 | 0 | 46 |
JavaScript | 2 | 0 | 1 | 33 |
PHP code 0% from 2 tests
Analyzing cyclomatic complexity and code structure
Please fix the following
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,368)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 502)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 459.64 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,368.00 |
Average method complexity | 10.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 502.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 14 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 14 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 701 | |
▷ Static methods | 109 | 15.55% |
▷ Public methods | 425 | 60.63% |
▷ Protected methods | 276 | 39.37% |
▷ Private methods | 0 | 0.00% |
Functions | 23 | |
▷ Named functions | 23 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 108 | |
▷ Global constants | 108 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/pdf.png | 0.83KB | 0.75KB | ▼ 9.40% |
assets/images/delete.png | 0.26KB | 0.19KB | ▼ 25.84% |
assets/images/email.png | 0.81KB | 0.73KB | ▼ 9.93% |