89% how-your-carbon-impact

Code Review | Show your plugin impact

WordPress plugin Show your plugin impact scored89%from 54 tests.

About plugin

  • Plugin page: how-your-carbon-i...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 29, 2023
  • Latest release: Nov 29, 2023
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: lacommunauteduplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /33 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Show your plugin impact
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.75 ▲0.19
Dashboard /wp-admin3.32 ▼0.0245.23 ▼19.41
Posts /wp-admin/edit.php3.38 ▲0.0248.42 ▲0.82
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.36 ▼15.48
Media Library /wp-admin/upload.php3.25 ▲0.0235.38 ▼1.36
Settings syci /wp-admin/tools.php?page=syci-settings3.2334.99

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Show your plugin impact
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5114.67 ▲0.321.76 ▼0.0443.94 ▲0.02
Dashboard /wp-admin2,203 ▲265.63 ▼0.0293.76 ▼1.2741.63 ▼0.46
Posts /wp-admin/edit.php2,111 ▲111.99 ▲0.0241.65 ▲3.0537.44 ▲0.41
Add New Post /wp-admin/post-new.php1,533 ▲123.06 ▲0.01600.08 ▼87.2150.44 ▼4.21
Media Library /wp-admin/upload.php1,411 ▲114.17 ▲0.0197.30 ▼10.4843.08 ▼4.95
Settings syci /wp-admin/tools.php?page=syci-settings8112.0123.8033.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: sustainability, carbon

how-your-carbon-impact/show-your-plugin-impact.php 85% from 13 tests

"Show your plugin impact" 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:
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("how-your-carbon-impact.php" instead of "show-your-plugin-impact.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected171 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File1131367
PHP1193655
CSS14026
JavaScript23023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin