88% co2ok-for-woocommerce

Code Review | ClimateClick: Climate Action for all

WordPress plugin ClimateClick: Climate Action for all scored88%from 54 tests.

About plugin

  • Plugin page: co2ok-for-woocomm...
  • Plugin version: 2.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Nov 29, 2023
  • Number of updates: 179
  • Update frequency: every 12.6 days
  • Top authors: co2ok (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

10+ active /7,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.47ms] Passed 4 tests

A check of server-side resources used by ClimateClick: Climate Action for all
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.26 ▼8.00
Dashboard /wp-admin3.31 ▼0.0444.86 ▼18.39
Posts /wp-admin/edit.php3.36 ▲0.0049.29 ▼2.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.27 ▼13.35
Media Library /wp-admin/upload.php3.23 ▲0.0035.22 ▲3.39

Server storage [IO: ▲1.32MB] [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: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for ClimateClick: Climate Action for all
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.66 ▲0.321.53 ▼0.1836.51 ▼7.06
Dashboard /wp-admin2,195 ▲185.62 ▲0.1092.21 ▼3.9041.45 ▼2.30
Posts /wp-admin/edit.php2,100 ▼01.96 ▲0.0239.07 ▲0.3835.77 ▼1.73
Add New Post /wp-admin/post-new.php1,526 ▼923.88 ▲5.23674.71 ▲20.0558.09 ▼1.05
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.0894.28 ▼0.2940.96 ▲0.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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 76% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 (Climate Click will add a checkout button)
The official readme.txt is a good inspiration

co2ok-for-woocommerce/south-pole-climate-click.php 62% from 13 tests

"ClimateClick: Climate Action for all" version 2.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("co2ok-for-woocommerce.php" instead of "south-pole-climate-click.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)
  • Domain Path: Prefix the domain path with a forward slash character ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,260 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11154438913
CSS2651347

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 code0.31
Average class complexity10.57
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.24MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/climate-tree.png1.16KB0.63KB▼ 45.90%
assets/images/dev-goal7.png49.58KB25.47KB▼ 48.62%
assets/images/dev-goal13.png53.89KB20.56KB▼ 61.85%
assets/images/dev-goal15.png31.68KB14.33KB▼ 54.75%
assets/images/climate-click-info.png45.62KB21.40KB▼ 53.09%