78% notes-widget-wrapper

Code Review | Notes Widget Wrapper

WordPress plugin Notes Widget Wrapper scored78%from 54 tests.

About plugin

  • Plugin page: notes-widget-wrapper
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2015
  • Latest release: Jan 14, 2023
  • Number of updates: 44
  • Update frequency: every 65.8 days
  • Top authors: stevepuddick (56.82%)_silver (45.45%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /13,791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.05ms] Passed 4 tests

An overview of server-side resources used by Notes Widget Wrapper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.94 ▼7.65
Dashboard /wp-admin3.34 ▲0.0346.22 ▼4.14
Posts /wp-admin/edit.php3.39 ▲0.0350.20 ▲2.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0597.85 ▲3.97
Media Library /wp-admin/upload.php3.26 ▲0.0336.99 ▲0.79
Notes Widget Wrapper /wp-admin/options-general.php?page=notes-widget-wrapper-widget-settings3.2731.57

Server storage [IO: ▲1.13MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
notes_widget_wrapper_default_shortcode_settings
can_compress_scripts
notes_widget_wrapper_defaults
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Notes Widget Wrapper
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲15413.63 ▼0.637.00 ▲5.1837.75 ▼10.29
Dashboard /wp-admin2,209 ▲215.80 ▼0.1195.19 ▼12.3740.10 ▼4.81
Posts /wp-admin/edit.php2,095 ▲91.98 ▼0.0340.87 ▲1.4034.49 ▲2.83
Add New Post /wp-admin/post-new.php2,162 ▲64823.22 ▲5.69685.25 ▼5.6637.23 ▼27.03
Media Library /wp-admin/upload.php1,397 ▲94.25 ▲0.1497.89 ▲1.5041.15 ▼4.11
Notes Widget Wrapper /wp-admin/options-general.php?page=notes-widget-wrapper-widget-settings1,4741.9637.6165.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • notes_widget_wrapper_defaults
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • notes_widget_wrapper_default_shortcode_settings
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/notes-widget-wrapper/admin/partials/notes-widget-wrapper-admin-display.php
    • > /wp-content/plugins/notes-widget-wrapper/public/partials/notes-widget-wrapper-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/notes-widget-wrapper/admin/partials/admin-post-shortcode-editor-modal.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/notes-widget-wrapper/admin/view-notes-widget-wrapper-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/notes-widget-wrapper/admin/admin-settings-page-promo-sidebar.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/notes-widget-wrapper/admin/admin-settings-page-setup.php:40

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === notes-widget-wrapper === )
You can take inspiration from this readme.txt

notes-widget-wrapper/notes-widget-wrapper.php Passed 13 tests

The principal PHP file in "Notes Widget Wrapper" v. 1.2.2 is loaded by WordPress automatically on each request
46 characters long description:
Wraps widgets in a "sticky note" style wrapper

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin11,271 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS32,03079,055
PHP163246721,204
LESS417096768
JavaScript66066219
JSON10025

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.57
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods411.76%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions15
▷ Named functions15100.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
9 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/notes-widget-wrapper-thumbnail.png8.42KB3.93KB▼ 53.32%
public/images/thumbtack-red.png21.51KB9.03KB▼ 58.03%
public/images/thumbtack-gray.png19.31KB8.73KB▼ 54.79%
public/images/thumbtack-orange.png22.17KB8.43KB▼ 61.99%
public/images/thumbtack-green.png24.42KB8.62KB▼ 64.70%