78% earth-day-live-wp

Code Review | Earth Day Live WP

WordPress plugin Earth Day Live WP scored78%from 54 tests.

About plugin

  • Plugin page: earth-day-live-wp
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Apr 8, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: djtoakley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Earth Day Live WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0324.99 ▼10.90
Dashboard /wp-admin3.32 ▲0.0242.76 ▼2.84
Posts /wp-admin/edit.php3.37 ▲0.0246.71 ▲4.38
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.13 ▼18.74
Media Library /wp-admin/upload.php3.25 ▲0.0236.98 ▲2.03
Earth Day Live Settings /wp-admin/options-general.php?page=earth-day-live-wp3.3031.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 27 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

Earth Day Live WP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.62 ▼1.014.97 ▲3.1741.06 ▲2.75
Dashboard /wp-admin2,211 ▲205.82 ▲0.9998.13 ▼12.4135.24 ▼6.45
Posts /wp-admin/edit.php2,097 ▲291.99 ▼0.0139.39 ▲3.5334.68 ▲3.30
Add New Post /wp-admin/post-new.php1,523 ▼1323.13 ▼0.05661.21 ▼10.1359.29 ▲6.68
Media Library /wp-admin/upload.php1,393 ▲24.22 ▲0.00107.24 ▲6.9348.61 ▲4.01
Earth Day Live Settings /wp-admin/options-general.php?page=earth-day-live-wp1,0452.0625.3527.77

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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

SRP 0% from 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/earth-day-live-wp/admin/partials/earth-day-live-wp-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/earth-day-live-wp/public/partials/earth-day-live-wp-public-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: climate, earth, global, earth-day

earth-day-live-wp/earth-day-live-wp.php Passed 13 tests

The primary PHP file in "Earth Day Live WP" version 1.0.0 is used by WordPress to initiate all plugin functionality
85 characters long description:
This plugin allows you to easily add the Earth Day Live widget to you Wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected422 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12131599396
CSS24420
JavaScript24546

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2580.65%
▷ Protected methods00.00%
▷ Private methods619.35%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 1.93MB with 1.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png343.81KB123.80KB▼ 63.99%
assets/screenshot-1.png475.49KB132.30KB▼ 72.18%
assets/icon-128x128.png20.68KB6.52KB▼ 68.49%
assets/banner-1544x500.png702.81KB232.57KB▼ 66.91%
assets/screenshot-3.png431.31KB133.24KB▼ 69.11%