Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > Error in wp-content/plugins/south-pole-the-offset-movement/co2ok-plugin.php+294
Uncaught Error: Class 'co2ok_plugin_woocommerce\Components\Co2ok_GraphQLClient' not found in wp-content/plugins/south-pole-the-offset-movement/co2ok-plugin.php:294
Stack trace:
#0 wp-content/plugins/south-pole-the-offset-movement/co2ok-plugin.php(347): co2ok_plugin_woocommerce\Co2ok_Plugin::registerMerchant()
#1 wp-includes/class-wp-hook.php(307): co2ok_plugin_woocommerce\Co2ok_Plugin::co2ok_Activated()
#2 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(474): WP_Hook->do_action()
#4 wp-admin/includes/plugin.php(689): do_action()
Server metrics [RAM: ▼0.02MB] [CPU: ▼295.71ms] Passed 4 tests
This is a short check of server-side resources used by South Pole: Climate action now
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.01 | 56.66 ▲5.78 |
Dashboard /wp-admin | 3.42 ▲0.01 | 34.95 ▲0.90 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 38.56 ▼0.10 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.09 | 93.20 ▼1,187.05 |
Media Library /wp-admin/upload.php | 3.30 ▲0.00 | 26.13 ▲3.43 |
Server storage [IO: ▲11.41MB] [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: 279 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_debug_mode |
fs_gdpr |
fs_active_plugins |
fs_accounts |
Browser metrics Passed 4 tests
An overview of browser requirements for South Pole: Climate action now
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,763 ▲9 | 15.94 ▲1.15 | 5.52 ▼1.32 | 2.21 ▼0.60 |
Dashboard /wp-admin | 2,895 ▲37 | 6.12 ▼0.05 | 131.86 ▼4.20 | 166.54 ▲5.05 |
Posts /wp-admin/edit.php | 2,694 ▲9 | 3.23 ▼0.02 | 63.21 ▼1.68 | 142.31 ▼2.35 |
Add New Post /wp-admin/post-new.php | 1,752 ▲91 | 21.05 ▲4.90 | 433.12 ▲11.21 | 158.50 ▲2.13 |
Media Library /wp-admin/upload.php | 1,698 ▼0 | 5.53 ▲0.04 | 136.36 ▼10.57 | 185.20 ▼2.38 |
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
You still need to fix the following
- Zombie WordPress options were found after uninstall: 4 options
- fs_accounts
- fs_active_plugins
- fs_gdpr
- fs_debug_mode
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
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/south-pole-the-offset-movement/freemius/templates/ajax-loader.php
- 33× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/south-pole-the-offset-movement/tests/bootstrap.php on line 14
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/south-pole-the-offset-movement/freemius/templates/account/partials/addon.php:9
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/south-pole-the-offset-movement/tests/test-co2ok-plugin.php:8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/south-pole-the-offset-movement/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
Uncaught Error: Class 'cbschuld\\LogEntriesWriter' not found in wp-content/plugins/south-pole-the-offset-movement/vendor/cbschuld/logentries/tests/WriterTest.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function woocommerce_form_field() in wp-content/plugins/south-pole-the-offset-movement/Templates/co2ok_button_template_default_cfp.php:5
- > PHP Notice
Undefined variable: co2ok_session_opted in wp-content/plugins/south-pole-the-offset-movement/Templates/co2ok_button_template_minimal.php on line 3
- > PHP Notice
Undefined variable: cart in wp-content/plugins/south-pole-the-offset-movement/Templates/co2ok_button_template_south_pole.php on line 1
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/south-pole-the-offset-movement/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/south-pole-the-offset-movement/tests/test-co2ok.php:11
- > PHP Warning
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)
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
south-pole-the-offset-movement/co2ok-plugin.php 85% from 13 tests
"South Pole: Climate action now" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("south-pole-the-offset-movement.php" instead of "co2ok-plugin.php")
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected40,362 lines of code in 193 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 144 | 7,907 | 17,122 | 33,106 |
JSON | 7 | 0 | 0 | 4,152 |
CSS | 14 | 84 | 32 | 1,038 |
JavaScript | 6 | 155 | 103 | 649 |
Sass | 2 | 59 | 3 | 541 |
Markdown | 4 | 173 | 0 | 446 |
PO File | 3 | 75 | 79 | 209 |
Bourne Shell | 1 | 21 | 7 | 99 |
XML | 3 | 3 | 0 | 43 |
YAML | 2 | 6 | 1 | 40 |
SVG | 6 | 0 | 0 | 34 |
INI | 1 | 0 | 0 | 5 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.60 |
Average class complexity | 60.28 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,907.00 |
Average method complexity | 4.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 2 | |
Traits | 2 | |
Classes | 68 | |
▷ Abstract classes | 5 | 7.35% |
▷ Concrete classes | 63 | 92.65% |
▷ Final classes | 0 | 0.00% |
Methods | 1,307 | |
▷ Static methods | 189 | 14.46% |
▷ Public methods | 953 | 72.92% |
▷ Protected methods | 15 | 1.15% |
▷ Private methods | 339 | 25.94% |
Functions | 113 | |
▷ Named functions | 99 | 87.61% |
▷ Anonymous functions | 14 | 12.39% |
Constants | 137 | |
▷ Global constants | 98 | 71.53% |
▷ Class constants | 39 | 28.47% |
▷ Public constants | 39 | 100.00% |
Plugin size 0% from 2 tests
Image compression 0% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
27 PNG files occupy 0.91MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/widgetmark.png | 4.80KB | 2.69KB | ▼ 43.99% |
(invalid) images/co2_projects.png | 313.81KB | 0.00KB | ▼ 100.00% |
images/gray_road_right.png | 4.29KB | 1.98KB | ▼ 53.94% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
images/button_minimal_co2ok.png | 15.11KB | 15.43KB | 0.00% |