Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.65MB] [CPU: ▼24.28ms] Passed 4 tests
Analyzing server-side resources used by DN Shopping discounts
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 39.31 ▼9.96 |
Dashboard /wp-admin | 3.29 ▼0.02 | 34.86 ▼19.53 |
Posts /wp-admin/edit.php | 3.35 ▼0.01 | 40.90 ▼9.75 |
Add New Post /wp-admin/post-new.php | 3.25 ▼2.64 | 38.16 ▼57.87 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 32.11 ▼5.44 |
Add New /wp-admin/post-new.php?post_type=dn_discounts | 3.19 | 32.92 |
Shopping discounts /wp-admin/edit.php?post_type=dn_discounts | 3.33 | 40.68 |
Test /wp-admin/edit.php?post_type=dn_discounts&page=dn_discounts_test_page | 3.27 | 28.28 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
DN Shopping discounts: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,843 ▲82 | 14.46 ▼0.27 | 1.84 ▲0.18 | 48.90 ▲2.05 |
Dashboard /wp-admin | 2,249 ▲69 | 5.62 ▲0.02 | 96.19 ▲6.68 | 41.11 ▲0.95 |
Posts /wp-admin/edit.php | 2,151 ▲51 | 2.03 ▲0.01 | 40.76 ▲0.24 | 37.65 ▲3.74 |
Add New Post /wp-admin/post-new.php | 1,581 ▲53 | 21.09 ▼2.08 | 596.30 ▼88.65 | 55.41 ▲1.89 |
Media Library /wp-admin/upload.php | 1,454 ▲57 | 4.14 ▼0.05 | 101.43 ▲3.61 | 43.62 ▼0.64 |
Add New /wp-admin/post-new.php?post_type=dn_discounts | 1,543 | 2.60 | 51.85 | 62.01 |
Shopping discounts /wp-admin/edit.php?post_type=dn_discounts | 1,160 | 1.92 | 33.18 | 32.03 |
Test /wp-admin/edit.php?post_type=dn_discounts&page=dn_discounts_test_page | 848 | 2.01 | 25.72 | 22.09 |
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
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- > GET request to /wp-admin/post-new.php?post_type=dn_discounts
- > Notice in wp-content/plugins/dn-shopping-discounts/dn-shopping-discounts.php+106
Undefined index: post_type
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=dn_discounts&page=dn_discounts_test_page
- > User deprecated in wp-includes/functions.php+5828
Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/dn-shopping-discounts/dn-shopping-discounts.php
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: sconto sul totale, discount, woocommerce, sconto sulla spesa, sconti...
dn-shopping-discounts/dn-shopping-discounts.php 85% from 13 tests
The principal PHP file in "DN Shopping discounts" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 219 characters long)
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin275 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 3 | 26 | 178 |
PO File | 1 | 30 | 33 | 88 |
JavaScript | 1 | 0 | 0 | 6 |
CSS | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 35.00 |
▷ Minimum class complexity | 35.00 |
▷ Maximum class complexity | 35.00 |
Average method complexity | 3.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 16 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/logo.png | 11.87KB | 3.06KB | ▼ 74.20% |