83% sticky-notes-widget

Code Review | Sticky Notes Widget

WordPress plugin Sticky Notes Widget scored83%from 54 tests.

About plugin

  • Plugin page: sticky-notes-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2015
  • Latest release: Feb 20, 2015
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: nazmul.hossain.nihal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /3,956 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Sticky Notes Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.62 ▼2.68
Dashboard /wp-admin3.32 ▲0.0148.02 ▲1.53
Posts /wp-admin/edit.php3.37 ▲0.0144.59 ▼1.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.73 ▲7.21
Media Library /wp-admin/upload.php3.24 ▲0.0137.94 ▲4.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_stickynoteswidget
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Notes Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.73 ▲0.151.61 ▲0.0241.43 ▲3.56
Dashboard /wp-admin2,217 ▲495.91 ▲0.3788.07 ▲0.5437.83 ▼5.55
Posts /wp-admin/edit.php2,118 ▲152.30 ▲0.3535.78 ▼6.7933.58 ▼7.01
Add New Post /wp-admin/post-new.php1,540 ▲1222.99 ▼0.07668.24 ▼9.9138.52 ▼15.14
Media Library /wp-admin/upload.php1,419 ▲194.45 ▲0.16114.17 ▲11.6847.58 ▲5.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_stickynoteswidget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sticky-notes-widget/sticky-notes-widget.php:13

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 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Sticky Note Widgets), #2 (Admin Settings)
You can take inspiration from this readme.txt

sticky-notes-widget/sticky-notes-widget.php 92% from 13 tests

The main PHP script in "Sticky Notes Widget" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 222 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected289 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS24024154
PHP12711129
JavaScript1006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
22 PNG files occupy 1.18MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png187.28KB103.01KB▼ 45.00%
images/snw-pin-black.png2.17KB1.99KB▼ 8.58%
images/snw-paper-3.png172.91KB101.86KB▼ 41.09%
images/snw-footer-left.png1.24KB0.91KB▼ 26.01%
images/snw-tape-2.png2.74KB1.44KB▼ 47.41%