84% mailgun-post-notifications

Code Review | Mailgun Post Notifications

WordPress plugin Mailgun Post Notifications scored84%from 54 tests.

About plugin

  • Plugin page: mailgun-post-noti...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9
  • WordPress version: 6.3.1
  • First release: Sep 22, 2014
  • Latest release: Sep 22, 2014
  • Number of updates: 3
  • Update frequency: every 17.3 days
  • Top authors: jbrinley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,097 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.43ms] Passed 4 tests

A check of server-side resources used by Mailgun Post Notifications
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.46 ▼3.80
Dashboard /wp-admin3.31 ▲0.0148.67 ▼1.23
Posts /wp-admin/edit.php3.37 ▲0.0146.67 ▼4.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.82 ▼8.60
Media Library /wp-admin/upload.php3.24 ▲0.0138.49 ▲4.21

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Mailgun Post Notifications
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.74 ▲0.362.10 ▲0.2843.97 ▼2.54
Dashboard /wp-admin2,210 ▲224.85 ▼0.04100.96 ▼15.3140.71 ▼3.78
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0335.22 ▼2.0733.67 ▼1.74
Add New Post /wp-admin/post-new.php1,524 ▲1023.05 ▲5.46657.67 ▲1.6751.95 ▲3.08
Media Library /wp-admin/upload.php1,395 ▲74.28 ▲0.05100.44 ▲0.9344.81 ▼1.64

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/mailgun-post-notifications/email-templates/html/new-post.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailgun-post-notifications/mailgun-post-notifications.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mailgun-post-notifications/email-templates/text/new-post.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: email, mailing lists, notification, subscriptions

mailgun-post-notifications/mailgun-post-notifications.php 92% from 13 tests

This is the main PHP file of "Mailgun Post Notifications" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin496 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP79850445
Markdown120051

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.75
▷ Minimum class complexity6.00
▷ Maximum class complexity9.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods1551.72%
▷ Protected methods1137.93%
▷ Private methods310.34%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin