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
- This plugin did not install gracefully
- > Notice in wp-content/plugins/climate-friendly-cart/cfc-constant.php+46
Trying to access array offset on value of type bool
Server metrics [RAM: ▼10.28MB] [CPU: ▼2,114,255.68ms] Passed 4 tests
This is a short check of server-side resources used by Climate Friendly Cart
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 44.48 ▲40.97 | 8,465,595.55 ▲8,465,547.75 |
Dashboard /wp-admin | 3.35 ▼41.12 | 51.96 ▼8,457,010.66 |
Posts /wp-admin/edit.php | 3.40 ▲0.00 | 58.13 ▲2.46 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.00 | 89.11 ▼9.75 |
Media Library /wp-admin/upload.php | 3.27 ▲0.00 | 38.66 ▼4.76 |
Server storage [IO: ▲1.89MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for Climate Friendly Cart
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲43 | 14.42 ▲0.13 | 1.70 ▼0.04 | 43.94 ▲4.28 |
Dashboard /wp-admin | 2,195 ▲24 | 5.51 ▼0.11 | 83.82 ▼4.11 | 44.05 ▲2.43 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▼0.02 | 36.20 ▼1.47 | 37.93 ▼2.22 |
Add New Post /wp-admin/post-new.php | 1,540 ▲12 | 18.42 ▼4.61 | 635.73 ▼33.28 | 73.92 ▲25.33 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.21 ▲0.01 | 100.66 ▼16.56 | 41.75 ▼6.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
- > Warning in wp-content/plugins/climate-friendly-cart/cfc-constant.php+7
Use of undefined constant CFC_PLUGIN_FILE - assumed 'CFC_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
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)
Good news, no errors were detected
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
The following issues need your attention
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/climate-friendly-cart/includes/admin/class-cfc-admin-save-settings.php
- > /wp-content/plugins/climate-friendly-cart/includes/admin/class-cfc-admin-init.php
- > /wp-content/plugins/climate-friendly-cart/climate-friendly-cart.php
- 16× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/climate-friendly-cart/includes/admin/views/climate-friendly-rewards.php:2
- > PHP Fatal error
Uncaught Error: Class 'CFC_Carbonclick_Laravel_API' not found in wp-content/plugins/climate-friendly-cart/includes/admin/views/cfc-card-manager.php:2
- > PHP Warning
Use of undefined constant CFC_PLUGIN_PATH - assumed 'CFC_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/climate-friendly-cart/includes/admin/views/onboarding/onboarding-step-1.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'CFC_Carbonclick_Laravel_API' not found in wp-content/plugins/climate-friendly-cart/includes/admin/views/dashboard.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/climate-friendly-cart/includes/admin/views/cfc-settings.php:2
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/climate-friendly-cart/includes/class-cfc-rewards-endpoint.php:5
- > PHP Notice
Undefined variable: active_step in wp-content/plugins/climate-friendly-cart/includes/admin/views/cfc-onboarding.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/climate-friendly-cart/includes/admin/views/admin-dashboard-page.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/climate-friendly-cart/includes/admin/views/onboarding/onboarding-step-2.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/climate-friendly-cart/cfc-constant.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
- Plugin Name: Please specify the plugin name on the first line (
=== Climate Friendly Cart ===
) - Tags: Please delete some tags, you are using 11 tag instead of maximum 10
climate-friendly-cart/climate-friendly-cart.php Passed 13 tests
The main file in "Climate Friendly Cart" v. 1.3.124 serves as a complement to information provided in readme.txt and as the entry point to the plugin
33 characters long description:
We make sustainable business easy
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,718 lines of code in 55 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 37 | 1,303 | 496 | 5,112 |
CSS | 2 | 96 | 22 | 1,900 |
SVG | 13 | 0 | 1 | 535 |
JavaScript | 2 | 40 | 10 | 164 |
Markdown | 1 | 1 | 0 | 7 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 23.90 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 71.00 |
Average method complexity | 3.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.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 | 94 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 94 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 23 | |
▷ Global constants | 23 | 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
4 compressed PNG files occupy 0.04MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/look-and-feel/cloud-black.png | 3.65KB | 3.86KB | 0.00% |
assets/images/carbon-offset-thumbnail.png | 25.88KB | 21.58KB | ▼ 16.62% |
assets/images/look-and-feel/cloud-white.png | 3.65KB | 3.86KB | 0.00% |
assets/images/look-and-feel/cloud-standard.png | 3.65KB | 3.86KB | 0.00% |