84% email-notification-on-admin-login

Code Review | Email notification on admin login

WordPress plugin Email notification on admin login scored84%from 54 tests.

About plugin

  • Plugin page: email-notificatio...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 15, 2014
  • Latest release: Oct 3, 2018
  • Number of updates: 12
  • Update frequency: every 128.4 days
  • Top authors: Azumi93 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /2,905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Email notification on admin login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.50 ▼9.01
Dashboard /wp-admin3.31 ▲0.0149.50 ▼2.75
Posts /wp-admin/edit.php3.36 ▲0.0147.88 ▲0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.74 ▼8.24
Media Library /wp-admin/upload.php3.24 ▲0.0137.63 ▼0.66

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Email notification on admin login
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.55 ▼0.824.35 ▲2.1040.87 ▼1.28
Dashboard /wp-admin2,218 ▲155.80 ▲0.9398.76 ▼8.5340.71 ▼4.95
Posts /wp-admin/edit.php2,100 ▲212.05 ▲0.0340.94 ▲2.6835.19 ▲2.52
Add New Post /wp-admin/post-new.php1,557 ▲2523.20 ▲0.02617.95 ▼27.4352.40 ▼4.63
Media Library /wp-admin/upload.php1,403 ▲34.27 ▼0.0198.41 ▼10.0944.44 ▼1.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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)
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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/email-notification-on-admin-login/config.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/email-notification-on-admin-login/config.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
3 plugin tags: email notification, email notify on admin login, admin login notification

email-notification-on-admin-login/index.php 92% from 13 tests

This is the main PHP file of "Email notification on admin login" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("email-notification-on-admin-login.php" instead of "index.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 plugin53 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP232753

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin