48% wp-post-email-notification

Code Review | WP Post Email Notification

WordPress plugin WP Post Email Notification scored 48% from 54 tests.

About plugin

  • Plugin page: wp-post-email-not...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.9.6
  • WordPress version: 5.9.2
  • First release: Apr 2, 2016
  • Latest release: May 19, 2018
  • Number of updates: 34
  • Update frequency: every 22.9 days
  • Top authors: nstaeger (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active / 7,420 total downloads


Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼287.30ms] Passed 4 tests

Server-side resources used by WP Post Email Notification
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1150.67 ▼2.31
Dashboard /wp-admin3.51 ▲0.1134.57 ▲1.03
Posts /wp-admin/edit.php3.80 ▲0.1642.88 ▲4.04
Add New Post /wp-admin/post-new.php7.05 ▲0.0895.31 ▼1,142.91
Media Library /wp-admin/upload.php3.46 ▲0.1625.31 ▼5.01

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 285 new files
Database: 2 new tables, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by WP Post Email Notification
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,832 ▲8816.49 ▲0.5211.01 ▲3.002.64 ▲0.39
Dashboard /wp-admin2,912 ▲586.14 ▼0.14115.19 ▼12.29154.27 ▼1.81
Posts /wp-admin/edit.php2,711 ▲203.23 ▼0.0162.82 ▼0.63136.68 ▼6.73
Add New Post /wp-admin/post-new.php1,674 ▼3316.01 ▼2.19402.48 ▼0.99150.41 ▼5.86
Media Library /wp-admin/upload.php1,718 ▲175.48 ▼0.05137.52 ▼0.30182.64 ▼5.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/wp-post-email-notification/src/Model/JobModel.php+23
    Uncaught ArgumentCountError: Too few arguments to function Nstaeger\WpPostEmailNotification\Model\JobModel::__construct(), 1 passed in wp-content/plugins/wp-post-email-notification/uninstall.php on line 24 and exactly 2 expected in wp-content/plugins/wp-post-email-notification/src/Model/JobModel.php:23
    Stack trace:
    #0 wp-content/plugins/wp-post-email-notification/uninstall.php(24): Nstaeger\WpPostEmailNotification\Model\JobModel->__construct()
    #1 wp-admin/includes/plugin.php(1239): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(956): uninstall_plugin()
  • Uninstaller has failed for this plugin, leaving 285 files (1.11MB) in the plugin directory
    • (new file) config.php
    • (new file) src/Controller/AdminPageController.php
    • (new file) js/bundle/admin-options.js
    • (new file) js/bundle/frontend-widget.js
    • (new file) src/Controller/AdminJobController.php
    • (new file) package-lock.json
    • (new file) src/Controller/AdminSubscriberController.php
    • (new file) src/Controller/FrontendSubscriberController.php
    • (new file) src/Controller/AdminOptionController.php
    • (new file) README.txt
    • ...
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wppen_jobs
    • wp_wppen_subscribers
  • This plugin does not fully uninstall, leaving 2 options in the database
    • recovery_mode_email_last_sent
    • widget_subscriptionwidget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-post-email-notification/views/admin/options.php
    • > /wp-content/plugins/wp-post-email-notification/views/widget/widget.php
    • > /wp-content/plugins/wp-post-email-notification/wp-post-email-notification.php
  • 99× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' not found in wp-content/plugins/wp-post-email-notification/vendor/symfony/http-foundation/Session/SessionBagProxy.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' not found in wp-content/plugins/wp-post-email-notification/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\Response' not found in wp-content/plugins/wp-post-email-notification/vendor/symfony/http-foundation/RedirectResponse.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Templating\\Loader\\Loader' not found in wp-content/plugins/wp-post-email-notification/vendor/symfony/templating/Loader/FilesystemLoader.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Nstaeger\\CmsPluginFramework\\Broker\\EventBroker' not found in wp-content/plugins/wp-post-email-notification/vendor/nstaeger/cms-plugin-framework/src/Broker/Wordpress/WordpressEventBroker.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\Response' not found in wp-content/plugins/wp-post-email-notification/vendor/nstaeger/cms-plugin-framework/src/Http/ViewResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Nstaeger\\CmsPluginFramework\\Controller' not found in wp-content/plugins/wp-post-email-notification/src/Controller/AdminJobController.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-post-email-notification/config.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' not found in wp-content/plugins/wp-post-email-notification/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\Session\\Storage\ativeSessionStorage' not found in wp-content/plugins/wp-post-email-notification/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php:19

User-side errors Passed 1 test

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


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: subscriber, newsletter, post, widget, new...

wp-post-email-notification/wp-post-email-notification.php Passed 13 tests

The main PHP script in "WP Post Email Notification" version 1.1.1 is automatically included on every request by WordPress
68 characters long description:
Send email notifications to subscribers when a new post is published

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 detected19,201 lines of code in 276 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell1203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.94
▷ Minimum class complexity1.00
▷ Maximum class complexity226.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
▷ Abstract classes53.82%
▷ Concrete classes12696.18%
▷ Final classes32.38%
▷ Static methods1107.83%
▷ Public methods1,26890.31%
▷ Protected methods805.70%
▷ Private methods563.99%
▷ Named functions5461.36%
▷ Anonymous functions3438.64%
▷ Global constants85.93%
▷ Class constants12794.07%
▷ Public constants127100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin