94% custom-sticky-notes

Code Review | Custom Sticky Notes

WordPress plugin Custom Sticky Notes scored 94% from 54 tests.

About plugin

  • Plugin page: custom-sticky-notes
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.6.0
  • WordPress version: 5.8.1
  • First release: Oct 10, 2015
  • Latest release: Jan 18, 2021
  • Number of updates: 16
  • Update frequency: every 120.4 days
  • Top authors: ka2 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,097 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.11MB] [CPU: ▼159.12ms] Passed 4 tests

An overview of server-side resources used by Custom Sticky Notes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1337.70 ▲5.95
Dashboard /wp-admin3.03 ▼0.0335.35 ▼19.50
Posts /wp-admin/edit.php3.08 ▼0.0338.50 ▼11.25
Add New Post /wp-admin/post-new.php5.03 ▼0.4083.65 ▼599.24
Media Library /wp-admin/upload.php3.03 ▲0.0332.30 ▼6.47

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Sticky Notes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,061 ▲46516.99 ▲1.3514.50 ▲4.4450.88 ▼3.37
Dashboard /wp-admin3,160 ▲2237.07 ▲1.08158.42 ▲1.88123.00 ▲4.14
Posts /wp-admin/edit.php2,926 ▲1873.19 ▲0.4993.56 ▲21.2191.08 ▼12.17
Add New Post /wp-admin/post-new.php1,813 ▲13016.53 ▼2.23409.23 ▲12.62131.79 ▲22.93
Media Library /wp-admin/upload.php1,994 ▲1875.88 ▲0.84162.11 ▲8.90123.33 ▼13.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-sticky-notes/custom-sticky-notes.php:92

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: sticky notes, clipboard, snippets, admin bar, custom sticky notes

custom-sticky-notes/custom-sticky-notes.php Passed 13 tests

"Custom Sticky Notes" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
68 characters long description:
This plugin will add simple sticky notes in the WordPress admin bar.

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 detected336 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP157151255
PO File1354979
CSS1101
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods17
▷ Static methods15.88%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin