90% kaya-login-notification

Code Review | Kaya Login Notification

WordPress plugin Kaya Login Notification scored90%from 54 tests.

About plugin

  • Plugin page: kaya-login-notifi...
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 6, 2017
  • Latest release: Jul 18, 2023
  • Number of updates: 28
  • Update frequency: every 77.6 days
  • Top authors: kayastudio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Kaya Login Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.13 ▲1.98
Dashboard /wp-admin3.34 ▲0.0343.39 ▼4.38
Posts /wp-admin/edit.php3.45 ▲0.0945.42 ▼0.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.71 ▼17.95
Media Library /wp-admin/upload.php3.26 ▲0.0339.29 ▲5.45
Kaya Studio /wp-admin/admin.php?page=kayastudio-plugins-admin-main-page3.2731.77
Login Notification /wp-admin/admin.php?page=wpkln-kaya-login-notification-admin-settings-page3.3229.30

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Kaya Login Notification: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲16113.35 ▼1.211.74 ▲0.0442.71 ▼0.33
Dashboard /wp-admin2,310 ▲1255.88 ▼0.08104.38 ▲1.5337.90 ▼6.37
Posts /wp-admin/edit.php2,200 ▲1112.04 ▼0.0241.95 ▲6.7434.77 ▲1.77
Add New Post /wp-admin/post-new.php1,541 ▲2023.34 ▲0.05667.19 ▼8.4555.10 ▼1.69
Media Library /wp-admin/upload.php1,499 ▲1114.25 ▲0.0396.33 ▼11.2343.22 ▼5.26
Kaya Studio /wp-admin/admin.php?page=kayastudio-plugins-admin-main-page1,0381.6723.9740.82
Login Notification /wp-admin/admin.php?page=wpkln-kaya-login-notification-admin-settings-page1,3401.7122.4439.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: administration, dashboard, admin login notification, sign-in, login notification...

kaya-login-notification/kaya-login-notification.php Passed 13 tests

The principal PHP file in "Kaya Login Notification" v. 1.5.2 is loaded by WordPress automatically on each request
79 characters long description:
Sends email notification on successful login, with fully customizable settings.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,618 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP163458612,869
CSS29023544
PO File176102205

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity63.50
▷ Minimum class complexity5.00
▷ Maximum class complexity271.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods123
▷ Static methods1512.20%
▷ Public methods4536.59%
▷ Protected methods6855.28%
▷ Private methods108.13%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants97
▷ Global constants66.19%
▷ Class constants9193.81%
▷ Public constants91100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin