Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.21MB] [CPU: ▼3.87ms] Passed 4 tests
A check of server-side resources used by Cost Calculator & Cost Estimation
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.68 ▲0.21 | 35.80 ▼1.92 |
Dashboard /wp-admin | 3.53 ▲0.18 | 48.73 ▼10.09 |
Posts /wp-admin/edit.php | 3.64 ▲0.29 | 51.22 ▲4.94 |
Add New Post /wp-admin/post-new.php | 6.11 ▲0.23 | 79.13 ▼4.98 |
Media Library /wp-admin/upload.php | 3.43 ▲0.20 | 34.36 ▲1.51 |
Entries /wp-admin/edit.php?post_type=cf_submissions | 3.51 | 40.89 |
Calculation Forms /wp-admin/edit.php?post_type=calculation_forms | 3.50 | 37.27 |
Settings /wp-admin/edit.php?post_type=calculation_forms&page=calculation-forms-settings | 3.40 | 33.64 |
Add New /wp-admin/post-new.php?post_type=calculation_forms | 3.57 | 49.38 |
Coupons /wp-admin/edit.php?post_type=cf_coupon | 3.50 | 38.92 |
Add-ons /wp-admin/edit.php?post_type=calculation_forms&page=calculation-forms-add-ons | 3.40 | 31.21 |
Server storage [IO: ▲12.49MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 782 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Cost Calculator & Cost Estimation
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,032 ▲286 | 14.97 ▲0.61 | 1.68 ▼0.08 | 40.98 ▲0.42 |
Dashboard /wp-admin | 2,414 ▲237 | 6.56 ▲0.96 | 109.35 ▲19.82 | 95.05 ▲50.56 |
Posts /wp-admin/edit.php | 2,354 ▲251 | 3.74 ▲1.76 | 50.80 ▲9.91 | 62.89 ▲25.13 |
Add New Post /wp-admin/post-new.php | 6,271 ▲4,736 | 19.44 ▲1.31 | 851.84 ▲192.55 | 36.92 ▼24.20 |
Media Library /wp-admin/upload.php | 1,497 ▲103 | 4.53 ▲0.33 | 114.52 ▲15.80 | 43.24 ▲1.47 |
Entries /wp-admin/edit.php?post_type=cf_submissions | 1,372 | 3.64 | 54.31 | 61.11 |
Calculation Forms /wp-admin/edit.php?post_type=calculation_forms | 1,341 | 3.63 | 45.80 | 56.45 |
Settings /wp-admin/edit.php?post_type=calculation_forms&page=calculation-forms-settings | 1,369 | 3.40 | 40.53 | 60.03 |
Add New /wp-admin/post-new.php?post_type=calculation_forms | 4,200 | 4.89 | 120.65 | 82.44 |
Coupons /wp-admin/edit.php?post_type=cf_coupon | 1,330 | 3.64 | 48.01 | 78.70 |
Add-ons /wp-admin/edit.php?post_type=calculation_forms&page=calculation-forms-add-ons | 1,369 | 3.39 | 40.44 | 66.81 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 48 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=calculation_forms&page=calculation-forms-add-ons
- > Notice in wp-content/plugins/cost-calculator-cost-estimation/backend/settings.php+53
Undefined index: currencies
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 5× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/cost-calculator-cost-estimation/vendor/sabberworm/php-css-parser/tests/quickdump.php
- > /wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/build.php
- > /wp-content/plugins/cost-calculator-cost-estimation/rednumber/check_purchase_code.php
- > /wp-content/plugins/cost-calculator-cost-estimation/calculation-forms.php
- > /wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/update_certs.php
- 435× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cost-calculator-cost-estimation/fields/payment_methods.php:2
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/lib/Service/SkuService.php:7
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/lib/Radar/ValueList.php:26
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/lib/InvoiceLineItem.php:30
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/lib/ApiResource.php:8
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/lib/LineItem.php:21
- > PHP Fatal error
Uncaught Error: Interface 'Svg\\Surface\\SurfaceInterface' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cost-calculator-cost-estimation/backend/block_editor/register_block.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cost-calculator-cost-estimation/fields/recaptcha.php:2
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/lib/BitcoinTransaction.php:16
- > PHP Fatal error
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)
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: cost calculator, calculated, payment forms, booking, cost estimation...
cost-calculator-cost-estimation/calculation-forms.php 85% from 13 tests
The main PHP file in "Cost Calculator & Cost Estimation" ver. 1.8.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("cost-calculator-cost-estimation.php" instead of "calculation-forms.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/cost-calculator-cost-estimation/vendor/stripe/stripe-php/data/ca-certificates.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 553 | 11,208 | 26,359 | 68,051 |
JavaScript | 16 | 133 | 514 | 4,119 |
Markdown | 17 | 1,064 | 0 | 2,488 |
CSS | 53 | 179 | 109 | 1,966 |
JSON | 11 | 0 | 0 | 704 |
XML | 9 | 8 | 2 | 196 |
YAML | 7 | 20 | 2 | 120 |
SVG | 3 | 32 | 0 | 62 |
make | 1 | 9 | 0 | 27 |
HTML | 1 | 0 | 0 | 17 |
Ruby | 1 | 0 | 0 | 2 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Method cyclomatic complexity should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 16.22 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 807.00 |
Average method complexity | 3.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 71 | |
Interfaces | 17 | |
Traits | 7 | |
Classes | 481 | |
▷ Abstract classes | 23 | 4.78% |
▷ Concrete classes | 458 | 95.22% |
▷ Final classes | 0 | 0.00% |
Methods | 3,121 | |
▷ Static methods | 299 | 9.58% |
▷ Public methods | 2,720 | 87.15% |
▷ Protected methods | 256 | 8.20% |
▷ Private methods | 145 | 4.65% |
Functions | 187 | |
▷ Named functions | 64 | 34.22% |
▷ Anonymous functions | 123 | 65.78% |
Constants | 960 | |
▷ Global constants | 7 | 0.73% |
▷ Class constants | 953 | 99.27% |
▷ Public constants | 953 | 100.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
backend/images/fromat-pro.png | 10.45KB | 2.89KB | ▼ 72.32% |
modules/signature/lib/images/remove-icon.png | 2.39KB | 1.19KB | ▼ 50.31% |
backend/images/eye_off_icon.png | 1.52KB | 0.97KB | ▼ 36.12% |
frontend/images/stripe.png | 14.89KB | 4.09KB | ▼ 72.51% |
backend/images/upgrade.png | 24.11KB | 7.27KB | ▼ 69.85% |