78% admin-login-sms-notification

Code Review | Admin login SMS notification

WordPress plugin Admin login SMS notification scored 78% from 54 tests.

About plugin

  • Plugin page: admin-login-sms-n...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: Oct 10, 2014
  • Latest release: Oct 10, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: santiaga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 988 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.15MB] [CPU: ▼159.58ms] Passed 4 tests

An overview of server-side resources used by Admin login SMS notification
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.57 ▲13.72
Dashboard /wp-admin2.99 ▼0.0731.42 ▼13.69
Posts /wp-admin/edit.php3.04 ▼0.0732.50 ▼28.53
Add New Post /wp-admin/post-new.php4.98 ▼0.4574.45 ▼591.19
Media Library /wp-admin/upload.php2.99 ▼0.0127.23 ▼4.92
SMS Login Notification /wp-admin/options-general.php?page=wp_smsrunot2.9621.26

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 3 new options
New WordPress options
wp_smsrunot_enable
wp_smsrunot_apikey
wp_smsrunot_number

Browser metrics Passed 4 tests

Admin login SMS notification: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.84 ▲0.348.28 ▼0.9152.56 ▲7.70
Dashboard /wp-admin2,978 ▲475.91 ▼0.27147.66 ▼12.88112.76 ▼0.59
Posts /wp-admin/edit.php2,744 ▲82.83 ▲0.1566.03 ▼3.4795.26 ▼0.99
Add New Post /wp-admin/post-new.php1,675 ▲518.75 ▼0.35357.34 ▲0.36111.04 ▼3.67
Media Library /wp-admin/upload.php1,812 ▲85.06 ▼0.01156.11 ▲9.43126.61 ▲7.66
SMS Login Notification /wp-admin/options-general.php?page=wp_smsrunot1,0432.0552.6363.04

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 3 options
    • wp_smsrunot_number
    • wp_smsrunot_enable
    • wp_smsrunot_apikey

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_smsrunot
    • > Notice in wp-content/plugins/admin-login-sms-notification/wp-admin-login-sms-notification.php+74
    Undefined index: logged_in_once

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-login-sms-notification/wp-admin-login-sms-notification.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === admin-login-sms-notification === )
  • Screenshots: Screenshot #1 (**Settings** - Setting page.) image required
Please take inspiration from this readme.txt

admin-login-sms-notification/wp-admin-login-sms-notification.php 92% from 13 tests

The principal PHP file in "Admin login SMS notification" v. 1.0 is loaded by WordPress automatically on each request
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 ("admin-login-sms-notification.php" instead of "wp-admin-login-sms-notification.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected85 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1133151
PO File291034

PHP code Passed 2 tests

An overview 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.50
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.83KB8.37KB▼ 55.55%