Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- Install procedure had errors
- > Error in wp-content/plugins/its-jewellery-price/includes/class-jewellery-price-activator.php+236
Uncaught Error: Class 'WC_Cache_Helper' not found in wp-content/plugins/its-jewellery-price/includes/class-jewellery-price-activator.php:236
Stack trace:
#0 wp-content/plugins/its-jewellery-price/includes/class-jewellery-price-activator.php(137): Jewellery_Price_Activator::createAttribute()
#1 wp-content/plugins/its-jewellery-price/its-jewellery-price.php(77): Jewellery_Price_Activator::activate()
#2 wp-includes/class-wp-hook.php(310): activate_jewellery_price()
#3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#4 wp-includes/plugin.php(517): WP_Hook->do_action()
#5 wp-admin/includes/plugin.php(693): do_action()
Server metrics [RAM: ▲0.00MB] [CPU: ▼2.44ms] Passed 4 tests
An overview of server-side resources used by ITS Jewellery Price Plugin
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.45 ▼3.31 |
Dashboard /wp-admin | 3.31 ▲0.00 | 50.24 ▼2.18 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.97 ▲0.22 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 89.77 ▼4.49 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 38.35 ▲4.54 |
Server storage [IO: ▲1.68MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 60 new files
Database: 4 new tables, 6 new options
New tables |
---|
wp_its_jp_metal_price_logs |
wp_its_jp_price_metal_groups |
wp_its_jp_price_settings |
wp_its_jp_product_price_logs |
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
ITS Jewellery Price Plugin: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.35 ▼0.01 | 1.91 ▼0.06 | 41.43 ▲0.23 |
Dashboard /wp-admin | 2,198 ▲21 | 5.59 ▼0.07 | 83.34 ▼9.52 | 43.25 ▼4.63 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.01 ▲0.01 | 37.51 ▲0.66 | 33.66 ▼12.24 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.18 ▲0.05 | 695.24 ▲51.75 | 53.35 ▼6.50 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.28 ▲0.09 | 114.15 ▲11.60 | 46.91 ▼1.93 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie tables detected upon uninstall: 4 tables
- wp_its_jp_price_metal_groups
- wp_its_jp_product_price_logs
- wp_its_jp_price_settings
- wp_its_jp_metal_price_logs
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 10× PHP files output text when accessed directly:
- > /wp-content/plugins/its-jewellery-price/admin/partials/settings/add-metal-group.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/plugin-activation/user-details-form.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-footer.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/settings/shortcodes.php
- > /wp-content/plugins/its-jewellery-price/public/partials/its-price-breakup-public-display.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/settings/general.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-addons.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/settings/add-metal.php
- > /wp-content/plugins/its-jewellery-price/admin/partials/settings/discount.php
- > /wp-content/plugins/its-jewellery-price/public/partials/jewellery-price-public-display.php
- 37× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
include_once(JEWELLERY_PRICE_PLUGIN_PATHadmin/partials/jewellery-price-admin-header.php): failed to open stream: No such file or directory in wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-display.php on line 16
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/its-jewellery-price/includes/class-itsjp-activate.php:4
- > PHP Warning
include_once(): Failed opening 'JEWELLERY_PRICE_PLUGIN_PATHadmin/partials/jewellery-price-admin-header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-settings.php on line 16
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-product-price-log.php:26
- > PHP Warning
Use of undefined constant JEWELLERY_PRICE_PLUGIN_URL - assumed 'JEWELLERY_PRICE_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/its-jewellery-price/admin/partials/settings/add-metal-group.php on line 3
- > PHP Warning
Use of undefined constant JEWELLERY_PRICE_PLUGIN_URL - assumed 'JEWELLERY_PRICE_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/its-jewellery-price/admin/partials/settings/discount.php on line 3
- > PHP Warning
Use of undefined constant JEWELLERY_PRICE_PLUGIN_PATH - assumed 'JEWELLERY_PRICE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-addons.php on line 14
- > PHP Warning
include_once(): Failed opening 'JEWELLERY_PRICE_PLUGIN_PATHadmin/partials/jewellery-price-admin-header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/its-jewellery-price/admin/partials/its-price-breakup-admin-display.php on line 15
- > PHP Warning
Use of undefined constant JEWELLERY_PRICE_PLUGIN_PATH - assumed 'JEWELLERY_PRICE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/its-jewellery-price/admin/partials/jewellery-price-admin-settings.php on line 16
- > PHP Warning
include_once(JEWELLERY_PRICE_PLUGIN_PATHadmin/partials/jewellery-price-admin-header.php): failed to open stream: No such file or directory in wp-content/plugins/its-jewellery-price/admin/partials/its-price-breakup-admin-display.php on line 15
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: dynamic price-update, jewellery, gold price, diamond price, precious metals...
its-jewellery-price/its-jewellery-price.php 85% from 13 tests
The entry point to "ITS Jewellery Price Plugin" version 23.07.20 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 444 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin3,384 lines of code in 44 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 32 | 552 | 939 | 2,714 |
JavaScript | 6 | 92 | 66 | 404 |
CSS | 6 | 14 | 58 | 266 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 23.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 92.00 |
Average method complexity | 4.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 40.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 69 | |
▷ Static methods | 5 | 7.25% |
▷ Public methods | 60 | 86.96% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 9 | 13.04% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 10 | 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
6 PNG files occupy 0.30MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/general-tab-pro.png | 131.37KB | 36.43KB | ▼ 72.27% |
admin/images/whatsapp-button.png | 2.00KB | 1.07KB | ▼ 46.61% |
admin/images/metal-group-pro.png | 42.75KB | 15.62KB | ▼ 63.46% |
admin/images/its-icon-logo.png | 31.79KB | 12.45KB | ▼ 60.83% |
admin/images/discount-tab-pro.png | 49.58KB | 15.61KB | ▼ 68.52% |