88% note

Code Review | Note - A live edit text widget

WordPress plugin Note - A live edit text widget scored 88% from 54 tests.

About plugin

  • Plugin page: note
  • Plugin version: 1.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.6
  • WordPress version: 5.8.1
  • First release: Nov 10, 2014
  • Latest release: Jun 6, 2018
  • Number of updates: 23
  • Update frequency: every 56.8 days
  • Top authors: slocumstudio (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active / 108,042 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.58MB] [CPU: ▼137.90ms] 75% from 4 tests

This is a short check of server-side resources used by Note - A live edit text widget
Please take the time to fix the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 4,343.52ms on /wp-admin/options-general.php?page=note)
PageMemory (MB)CPU Time (ms)
Home /3.43 ▲0.5940.98 ▲9.93
Dashboard /wp-admin3.66 ▲0.6046.67 ▲0.09
Posts /wp-admin/edit.php3.71 ▲0.6051.48 ▲4.32
Add New Post /wp-admin/post-new.php5.95 ▲0.5292.98 ▼563.74
Media Library /wp-admin/upload.php3.60 ▲0.6037.41 ▲7.72
Note /wp-admin/options-general.php?page=note3.604,343.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 2 new options
New WordPress options
note
widget_note-widget

Browser metrics Passed 4 tests

An overview of browser requirements for Note - A live edit text widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.64 ▲0.0411.17 ▲1.9943.26 ▼2.96
Dashboard /wp-admin2,972 ▲415.91 ▼0.18146.36 ▼6.26106.70 ▲4.72
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0066.65 ▼1.2891.91 ▲2.26
Add New Post /wp-admin/post-new.php1,618 ▼6521.33 ▲2.54297.80 ▼77.60100.71 ▼13.47
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.00150.67 ▼1.92113.86 ▲1.18
Note /wp-admin/options-general.php?page=note2,1789.77257.77207.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 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 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
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/note/includes/admin/views/html-note-help.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/note/includes/admin/views/html-note-options-sidebar.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Note_Admin_Options_Views' not found in wp-content/plugins/note/includes/admin/views/html-note-options-uninstall-data-field.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/note/includes/admin/views/html-note-options-uninstall-section.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/note/includes/admin/views/html-note-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/note/includes/admin/views/html-note-options-general-section.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=note
    • > Other (warning) in unknown
    /wp-admin/options-general.php?page=note 159 Allow attribute will take precedence over 'allowfullscreen'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

note/note.php 92% from 13 tests

The main file in "Note - A live edit text widget" v. 1.4.7 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:
  • Domain Path: The domain path folder does not exist ("/languages/")

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
Everything looks great! No dangerous files found in this plugin9,221 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS97632913,999
PHP287921,9102,653
JavaScript97561,4572,569

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity37.92
▷ Minimum class complexity2.00
▷ Maximum class complexity210.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes12100.00%
Methods129
▷ Static methods3930.23%
▷ Public methods12395.35%
▷ Protected methods00.00%
▷ Private methods64.65%
Functions13
▷ Named functions13100.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
No PNG files were detected