78% user-draft-notifier

Code Review | User Draft Notifier

WordPress plugin User Draft Notifier scored78%from 54 tests.

About plugin

  • Plugin page: user-draft-notifier
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Sep 6, 2016
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: guruitengineer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by User Draft Notifier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.62 ▲2.15
Dashboard /wp-admin3.33 ▲0.0348.06 ▼2.86
Posts /wp-admin/edit.php3.38 ▲0.0250.00 ▼4.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.09 ▼6.32
Media Library /wp-admin/upload.php3.26 ▲0.0239.45 ▲0.78
Logs /wp-admin/admin.php?page=udn_log_page3.2031.57
Notify User /wp-admin/admin.php?page=udn_notify_page3.2032.58
Settings /wp-admin/admin.php?page=udn_setting_page3.2028.82

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Draft Notifier
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.22 ▲0.001.81 ▼0.1343.79 ▲2.46
Dashboard /wp-admin2,226 ▲565.63 ▲0.0895.77 ▼4.1040.45 ▼0.88
Posts /wp-admin/edit.php2,131 ▲311.99 ▲0.0447.40 ▲6.0036.87 ▼1.67
Add New Post /wp-admin/post-new.php1,551 ▲1422.94 ▲4.81644.72 ▲15.3658.78 ▼5.91
Media Library /wp-admin/upload.php1,434 ▲344.22 ▼0.0399.25 ▼8.3644.76 ▲0.99
Logs /wp-admin/admin.php?page=udn_log_page8262.0325.3828.68
Notify User /wp-admin/admin.php?page=udn_notify_page8042.0323.9927.10
Settings /wp-admin/admin.php?page=udn_setting_page8722.0325.6640.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=udn_log_page
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method User_Draft_Notifier::udn_log_page() should not be called statically
    • > GET request to /wp-admin/admin.php?page=udn_notify_page
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method User_Draft_Notifier::udn_notify_page() should not be called statically
    • > GET request to /wp-admin/admin.php?page=udn_setting_page
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method User_Draft_Notifier::udn_setting_page() should not be called statically

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
Please fix the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/user-draft-notifier/user-draft-notifier.php
    • > /wp-content/plugins/user-draft-notifier/includes/udn-notify.php
    • > /wp-content/plugins/user-draft-notifier/includes/udn-custom-settings.php
    • > /wp-content/plugins/user-draft-notifier/includes/udn-logs.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: users draft, notification, send notification

user-draft-notifier/user-draft-notifier.php 92% from 13 tests

The main file in "User Draft Notifier" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 190 characters long)

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
No dangerous file extensions were detected316 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42730316

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected