90% jetpack-holiday-snow-opt-in

Code Review | Jetpack Holiday Snow Opt-In

WordPress plugin Jetpack Holiday Snow Opt-In scored 90% from 54 tests.

About plugin

  • Plugin page: jetpack-holiday-s...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2013
  • Latest release: Dec 5, 2016
  • Number of updates: 11
  • Update frequency: every 99.4 days
  • Top authors: jjeaton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Jetpack Holiday Snow Opt-In
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.34 ▼5.12
Dashboard /wp-admin3.31 ▲0.0144.24 ▼2.81
Posts /wp-admin/edit.php3.36 ▲0.0149.23 ▲1.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.28 ▼13.37
Media Library /wp-admin/upload.php3.23 ▲0.0138.26 ▲2.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Jetpack Holiday Snow Opt-In
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.24 ▼0.901.84 ▼0.0239.46 ▼10.61
Dashboard /wp-admin2,206 ▲215.91 ▲0.04105.98 ▲6.9738.80 ▼7.47
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0139.95 ▲4.7334.16 ▲0.35
Add New Post /wp-admin/post-new.php1,533 ▲1923.48 ▲6.04661.58 ▼6.9751.27 ▼5.09
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.03100.34 ▼11.9144.71 ▼1.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: jetpack, accessibility

jetpack-holiday-snow-opt-in/jetpack-holiday-snow-opt-in.php Passed 13 tests

The primary PHP file in "Jetpack Holiday Snow Opt-In" version 0.1.5 is used by WordPress to initiate all plugin functionality
133 characters long description:
Make Jetpack's Holiday Snow feature accessible by only showing it if user has opted-in by clicking a snowflake displayed on the page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin125 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13463125

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png51.10KB20.59KB▼ 59.72%