10% sticky-notes

Code Review | Sticky Note by Dolar Patel

WordPress plugin Sticky Note by Dolar Patel scored10%from 54 tests.

About plugin

  • Plugin page: sticky-notes
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Jun 2, 2016
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: Dolar Patel (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /814 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sticky-notes/widget_plugin.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; stn_plugin has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.31ms] Passed 4 tests

This is a short check of server-side resources used by Sticky Note by Dolar Patel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.50 ▼35.38
Dashboard /wp-admin2.10 ▼1.246.52 ▼53.98
Posts /wp-admin/edit.php2.10 ▼1.255.39 ▼46.16
Add New Post /wp-admin/post-new.php2.10 ▼3.785.43 ▼93.70
Media Library /wp-admin/upload.php2.10 ▼1.135.69 ▼27.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Note by Dolar Patel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.371.97 ▲0.3044.46 ▼0.58
Dashboard /wp-admin2,189 ▲125.50 ▼0.0991.04 ▼1.8945.14 ▲7.95
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0339.65 ▲3.2436.35 ▼3.13
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▲0.39585.59 ▼11.7864.11 ▼0.78
Media Library /wp-admin/upload.php1,403 ▼04.30 ▲0.1696.48 ▼6.7745.72 ▲4.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/sticky-notes/widget_plugin.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; stn_plugin has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_stn_plugin
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

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

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Backend), #2 (Frontend view)
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

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

The main file in "Sticky Note by Dolar Patel" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sticky-notes.php" instead of "widget_plugin.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
No dangerous file extensions were detected1,496 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23271701,357
PHP1131098
CSS14241

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.47MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Backend.png79.37KB35.89KB▼ 54.78%
assests/image/multicolor_page2.png117.90KB38.17KB▼ 67.63%
assests/image/purple_with_Stich_pin.png6.07KB2.40KB▼ 60.44%
assests/image/multicolor_page.png106.08KB30.96KB▼ 70.81%
assests/image/purple_with_dot_pin.png6.16KB2.42KB▼ 60.79%