74% user-login-plus

Code Review | User Login Plus

WordPress plugin User Login Plus scored74%from 54 tests.

About plugin

  • Plugin page: user-login-plus
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Dec 30, 2017
  • Latest release: Dec 30, 2017
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: appally (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.02ms] Passed 4 tests

Server-side resources used by User Login Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0643.45 ▲1.18
Dashboard /wp-admin3.40 ▲0.0552.88 ▲0.36
Posts /wp-admin/edit.php3.51 ▲0.1165.05 ▲18.84
Add New Post /wp-admin/post-new.php5.98 ▲0.0588.64 ▼1.28
Media Library /wp-admin/upload.php3.32 ▲0.0542.44 ▲3.83

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: 1 new table, 6 new options
New tables
wp_users_login_logs
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

User Login Plus: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.381.74 ▲0.0545.38 ▲6.77
Dashboard /wp-admin2,198 ▲215.60 ▼0.0784.27 ▼6.1739.43 ▼2.83
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0136.64 ▼4.9036.74 ▼2.45
Add New Post /wp-admin/post-new.php1,536 ▲1023.11 ▼0.57665.81 ▼27.4651.47 ▼12.01
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.0697.82 ▼11.4844.64 ▼2.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_users_login_logs
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-login-plus/user-login-plus.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

user-login-plus/user-login-plus.php Passed 13 tests

The entry point to "User Login Plus" version 1.1 is a PHP file that has certain tags in its header comment area
88 characters long description:
Show a users last login date by creating a sortable column in your WordPress users list.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin203 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110136203

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.20
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There were not PNG files found in your plugin