84% pending-draft-alert

Code Review | Pending Draft Alert

WordPress plugin Pending Draft Alert scored84%from 54 tests.

About plugin

  • Plugin page: pending-draft-alert
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 17, 2020
  • Latest release: Apr 18, 2020
  • Number of updates: 15
  • Update frequency: every 0.3 days
  • Top authors: excalabyte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 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.12MB] [CPU: ▼3.63ms] Passed 4 tests

A check of server-side resources used by Pending Draft Alert
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.25 ▼4.65
Dashboard /wp-admin3.51 ▲0.1653.30 ▼14.69
Posts /wp-admin/edit.php3.56 ▲0.2056.49 ▲7.33
Add New Post /wp-admin/post-new.php6.00 ▲0.1194.56 ▲3.16
Media Library /wp-admin/upload.php3.34 ▲0.1139.98 ▲1.65
Pending Draft Alert /wp-admin/options-general.php?page=wppda_settings3.3440.12

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
wppda_setting_basic
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pending Draft Alert
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲19914.54 ▲0.171.80 ▼0.0440.26 ▼9.01
Dashboard /wp-admin2,354 ▲1746.32 ▲0.62122.27 ▲18.6638.41 ▼4.14
Posts /wp-admin/edit.php2,276 ▲1763.54 ▲1.5254.71 ▲16.5433.62 ▼14.64
Add New Post /wp-admin/post-new.php1,548 ▲423.46 ▲0.47647.66 ▼29.2137.13 ▼34.01
Media Library /wp-admin/upload.php1,422 ▲224.37 ▲0.1982.69 ▼32.3843.16 ▼3.23
Pending Draft Alert /wp-admin/options-general.php?page=wppda_settings1,0543.4850.9528.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • wppda_setting_basic
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pending-draft-alert/email/email-view.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: reminder, drafts, drafts post, email reminder, email

pending-draft-alert/wp-pending-draft-alert.php 85% from 13 tests

The main PHP file in "Pending Draft Alert" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pending-draft-alert.php" instead of "wp-pending-draft-alert.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin623 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6168264623

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.00
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods3694.74%
▷ Protected methods00.00%
▷ Private methods25.26%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
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
There are no PNG files in this plugin