84% manage-notification-emails

Code Review | Manage Notification E-mails

WordPress plugin Manage Notification E-mails scored84%from 54 tests.

About plugin

  • Plugin page: manage-notificati...
  • Plugin version: 1.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Jun 1, 2023
  • Number of updates: 64
  • Update frequency: every 44.1 days
  • Top authors: Virgial (100%)

Code review

54 tests

User reviews

51 reviews

Install metrics

100,000+ active /599,488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Manage Notification E-mails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.61 ▼4.32
Dashboard /wp-admin3.34 ▲0.0351.59 ▲1.45
Posts /wp-admin/edit.php3.45 ▲0.0953.55 ▼2.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.87 ▼7.16
Media Library /wp-admin/upload.php3.26 ▲0.0337.58 ▲2.13
Notification e-mails /wp-admin/options-general.php?page=famne-admin3.3036.85

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
famne_options

Browser metrics Passed 4 tests

A check of browser resources used by Manage Notification E-mails
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.36 ▼0.011.75 ▼0.1646.59 ▲1.60
Dashboard /wp-admin2,202 ▲255.60 ▼0.0388.44 ▲0.2138.39 ▼2.02
Posts /wp-admin/edit.php2,083 ▼172.06 ▲0.0635.83 ▼3.7432.44 ▼7.42
Add New Post /wp-admin/post-new.php1,529 ▲317.68 ▲0.24653.86 ▼44.1351.59 ▲0.25
Media Library /wp-admin/upload.php1,407 ▲74.27 ▲0.06104.14 ▲6.5641.88 ▼0.81
Notification e-mails /wp-admin/options-general.php?page=famne-admin1,1882.1231.4546.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/manage-notification-emails/modules/settings-page/views/donatebox.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === manage-notification-emails === )
The official readme.txt might help

manage-notification-emails/manage-notification-emails.php Passed 13 tests

"Manage Notification E-mails" version 1.8.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
This plugin gives you the option to disable some of the notification e-mails send by WordPress. It's a simple plugin but effective.

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
Success! There were no dangerous files found in this plugin2,106 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP224548571,483
PO File2160203621
CSS1111
JavaScript1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity38.00
▷ Minimum class complexity30.00
▷ Maximum class complexity46.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1546.88%
▷ Public methods2990.62%
▷ Protected methods13.12%
▷ Private methods26.25%
Functions61
▷ Named functions61100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.83MB with 0.59MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png366.33KB113.23KB▼ 69.09%
screenshot-2.png318.50KB89.83KB▼ 71.80%
screenshot-3.png160.74KB43.40KB▼ 73.00%