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.04MB] [CPU: ▼3.39ms] Passed 4 tests
Analyzing server-side resources used by Price Calculator block - Calculate the price of products based on quantity.
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 39.52 ▼0.95 |
Dashboard /wp-admin | 3.34 ▲0.04 | 45.65 ▼11.56 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 48.44 ▼2.78 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 95.36 ▲1.72 |
Media Library /wp-admin/upload.php | 3.26 ▲0.04 | 39.30 ▲5.29 |
Server storage [IO: ▲0.55MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
Price Calculator block - Calculate the price of products based on quantity.: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,820 ▲74 | 14.67 ▲0.43 | 11.94 ▲10.17 | 40.74 ▼6.30 |
Dashboard /wp-admin | 2,209 ▲24 | 5.91 ▲0.07 | 97.95 ▼2.54 | 38.66 ▼4.59 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.03 ▼0.03 | 40.08 ▲5.56 | 34.39 ▲4.90 |
Add New Post /wp-admin/post-new.php | 6,359 ▲4,829 | 28.04 ▲9.88 | 808.06 ▲172.41 | 36.01 ▼19.64 |
Media Library /wp-admin/upload.php | 1,391 ▲6 | 4.22 ▲0.04 | 97.09 ▼2.20 | 42.85 ▲0.02 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested
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
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
Use of undefined constant PCLB_PLUGIN_VERSION - assumed 'PCLB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/price-calculator/dist/script.asset.php on line 4
- > PHP Warning
Use of undefined constant PCLB_PLUGIN_VERSION - assumed 'PCLB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/price-calculator/dist/editor.asset.php on line 4
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
- Requires at least: Version not formatted correctly
price-calculator/plugin.php 92% from 13 tests
Analyzing the main PHP file in "Price Calculator block - Calculate the price of products based on quantity." version 1.0.9
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("price-calculator.php" instead of "plugin.php")
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
There were no executable files found in this plugin311 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 164 |
PO File | 1 | 43 | 82 | 104 |
PHP | 4 | 10 | 14 | 39 |
CSS | 2 | 0 | 2 | 2 |
JavaScript | 2 | 0 | 2 | 2 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.17 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.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 | 3 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 3 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin