83% wp-notepad

Code Review | WP Notepad

WordPress plugin WP Notepad scored83%from 54 tests.

About plugin

  • Plugin page: wp-notepad
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Mar 3, 2020
  • Latest release: Oct 10, 2023
  • Number of updates: 15
  • Update frequency: every 87.7 days
  • Top authors: RedWoodCIty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /702 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.59ms] Passed 4 tests

An overview of server-side resources used by WP Notepad
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.27 ▲1.37
Dashboard /wp-admin3.33 ▼0.0162.24 ▲0.90
Posts /wp-admin/edit.php3.39 ▲0.0352.53 ▼1.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.45 ▼3.51
Media Library /wp-admin/upload.php3.26 ▲0.0340.46 ▲4.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_wpnotepad
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Notepad
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10913.38 ▼0.978.02 ▲6.4042.26 ▼1.84
Dashboard /wp-admin2,198 ▲215.62 ▼0.0194.57 ▲8.1043.03 ▼2.39
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0036.91 ▼4.0234.20 ▼8.78
Add New Post /wp-admin/post-new.php1,531 ▲523.06 ▲0.03623.98 ▼86.3949.85 ▼6.76
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0196.50 ▼15.5944.35 ▼4.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wpnotepad

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RWC\\WPNotepad\\load_plugin_textdomain() in wp-content/plugins/wp-notepad/includes/plugin.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RWC\\WPNotepad\\load_plugin_textdomain() in wp-content/plugins/wp-notepad/includes/plugin.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RWC\\WPNotepad\\load_plugin_textdomain() in wp-content/plugins/wp-notepad/includes/plugin.php:14

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: notes, notepad, widget

wp-notepad/rwc-wpnotepad.php 77% from 13 tests

The entry point to "WP Notepad" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-notepad.php" instead of "rwc-wpnotepad.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected131 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3334775
PO File121649546
JavaScript13010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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