84% login-info-alert

Code Review | Login Info Alert

WordPress plugin Login Info Alert scored84%from 54 tests.

About plugin

  • Plugin page: login-info-alert
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.0.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: Jan 4, 2019
  • Number of updates: 4
  • Update frequency: every 77.3 days
  • Top authors: webplanetsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 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.02MB] [CPU: ▼1.66ms] Passed 4 tests

An overview of server-side resources used by Login Info Alert
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.81 ▼0.82
Dashboard /wp-admin3.33 ▲0.0345.87 ▼1.97
Posts /wp-admin/edit.php3.38 ▲0.0247.80 ▲2.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.57 ▼1.41
Media Library /wp-admin/upload.php3.25 ▲0.0234.13 ▼2.45

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Login Info Alert
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.31 ▼0.914.41 ▲1.9140.81 ▼10.40
Dashboard /wp-admin2,216 ▲254.85 ▼1.04112.04 ▼5.9141.87 ▼3.66
Posts /wp-admin/edit.php2,105 ▲192.05 ▼0.0039.49 ▲3.2737.10 ▲2.42
Add New Post /wp-admin/post-new.php1,547 ▲1423.15 ▼0.12613.58 ▼57.6554.87 ▲1.94
Media Library /wp-admin/upload.php1,401 ▲104.25 ▲0.09100.06 ▲2.2144.24 ▲1.34

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/login-info-alert/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: email, login, admin

login-info-alert/index.php 92% from 13 tests

The main PHP script in "Login Info Alert" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("login-info-alert.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin207 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43817207

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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.png19.97KB11.17KB▼ 44.04%