78% email-on-publish

Code Review | Email on Publish

WordPress plugin Email on Publish scored78%from 54 tests.

About plugin

  • Plugin page: email-on-publish
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Aug 10, 2011
  • Latest release: Sep 10, 2014
  • Number of updates: 26
  • Update frequency: every 46.4 days
  • Top authors: dkukral (80.77%)Droyal (19.23%)jboydston (7.69%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /7,758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.03ms] Passed 4 tests

This is a short check of server-side resources used by Email on Publish
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.52 ▼6.90
Dashboard /wp-admin3.33 ▲0.0347.09 ▼5.97
Posts /wp-admin/edit.php3.38 ▲0.0348.85 ▲4.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0390.85 ▼0.79
Media Library /wp-admin/upload.php3.25 ▲0.0336.04 ▲1.54
Email On Publish /wp-admin/options-general.php?page=email_on_publish3.2031.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
category_children
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Email on Publish
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.37 ▼1.384.77 ▲2.7640.35 ▼5.65
Dashboard /wp-admin2,207 ▲195.83 ▲0.9598.02 ▼19.4540.36 ▼8.36
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0139.65 ▲1.9735.59 ▼0.25
Add New Post /wp-admin/post-new.php1,536 ▲223.27 ▼0.05650.95 ▼25.0856.50 ▲1.81
Media Library /wp-admin/upload.php1,389 ▼24.19 ▼0.0296.99 ▼0.6743.88 ▲0.04
Email On Publish /wp-admin/options-general.php?page=email_on_publish1,3991.7429.1432.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • category_children
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 60 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=email_on_publish
    • > Notice in wp-content/plugins/email-on-publish/email-on-publish.php+117
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/email-on-publish/email-on-publish.php:11

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add a description for screenshot #1 in email-on-publish/assets to your readme.txt
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

email-on-publish/email-on-publish.php Passed 13 tests

This is the main PHP file of "Email on Publish" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Used to email text of post when it is published.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected178 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11723123
JavaScript101239
CSS14016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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