62% note-press

Code Review | Note Press

WordPress plugin Note Press scored 62% from 54 tests.

About plugin

  • Plugin page: note-press
  • Plugin version: 0.1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 5.9.2
  • First release: May 8, 2015
  • Latest release: Oct 16, 2017
  • Number of updates: 25
  • Update frequency: every 35.7 days
  • Top authors: datainterlock (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active / 7,741 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼292.20ms] Passed 4 tests

An overview of server-side resources used by Note Press
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1367.24 ▲17.06
Dashboard /wp-admin3.48 ▲0.0833.74 ▲0.73
Posts /wp-admin/edit.php3.70 ▲0.0736.68 ▼0.44
Add New Post /wp-admin/post-new.php6.95 ▼0.0294.27 ▼1,160.37
Media Library /wp-admin/upload.php3.36 ▲0.0622.62 ▼8.70
Note Press Settings /wp-admin/admin.php?page=Note-Press-Settings3.3822.63
Note Press /wp-admin/admin.php?page=Note_Press-Main-Menu3.7626.80

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 155 new files
Database: 1 new table, 4 new options
New tables
wp_Note_Press
New WordPress options
Note_Press_icons_url
Note_Press_icons_path
Note_Press_db_version
Note_Press_Args

Browser metrics Passed 4 tests

An overview of browser requirements for Note Press
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,858 ▲10515.95 ▲0.166.24 ▲0.172.67 ▲0.06
Dashboard /wp-admin2,994 ▲1336.84 ▲0.65113.93 ▼16.59178.44 ▲23.39
Posts /wp-admin/edit.php2,743 ▲523.24 ▲0.0066.01 ▲4.89153.79 ▲13.91
Add New Post /wp-admin/post-new.php1,703 ▼4916.52 ▼5.07387.20 ▼37.23207.69 ▲47.56
Media Library /wp-admin/upload.php1,751 ▲506.00 ▲0.55112.84 ▼29.15194.10 ▲3.07
Note Press Settings /wp-admin/admin.php?page=Note-Press-Settings1,1673.1556.69118.45
Note Press /wp-admin/admin.php?page=Note_Press-Main-Menu1,3013.0557.17113.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/note-press/uninstall.php+73
    Undefined variable: wpdb
  • Zombie WordPress options detected upon uninstall: 3 options
    • Note_Press_icons_path
    • Note_Press_Args
    • Note_Press_icons_url

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=Note_Press-Main-Menu
    • > Notice in wp-content/plugins/note-press/admin/Note_Press-admin-menu.php+1121
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Note_Press-Main-Menu
    • > Notice in wp-content/plugins/note-press/admin/Note_Press-admin-menu.php+441
    Undefined variable: example_data
    • > GET request to /wp-admin/admin.php?page=Note_Press-Main-Menu
    • > Warning in wp-content/plugins/note-press/admin/Note_Press-admin-menu.php+432
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/note-press/admin/partials/Note_Presss-admin-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/note-press/admin/views/admin.php:69

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: note, collaboration, clients, notepad, developer notes...

note-press/Note_Press.php 85% from 13 tests

"Note Press" version 0.1.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("note-press.php" instead of "Note_Press.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,089 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP152055561,746
PO File2127151321
XML2009
CSS2018
JavaScript2225

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.88
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions15
▷ Named functions15100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
115 PNG files occupy 1.01MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/icons/cost.png0.58KB0.73KB0.00%
public/icons/advertisment.png0.26KB0.26KB▼ 2.58%
assets/icon-256x256.png99.25KB9.72KB▼ 90.21%
public/icons/sign-up.png0.48KB0.56KB0.00%
admin/images/P0.png52.70KB0.34KB▼ 99.35%