84% user-last-login

Code Review | User Last Login

WordPress plugin User Last Login scored84%from 54 tests.

About plugin

  • Plugin page: user-last-login
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2015
  • Latest release: Feb 27, 2017
  • Number of updates: 35
  • Update frequency: every 21.1 days
  • Top authors: raj_prince (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /9,738 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.33ms] Passed 4 tests

Server-side resources used by User Last Login
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.21 ▼11.82
Dashboard /wp-admin3.35 ▲0.0146.90 ▼13.84
Posts /wp-admin/edit.php3.41 ▲0.0550.54 ▼0.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.75 ▲1.11
Media Library /wp-admin/upload.php3.28 ▲0.0533.51 ▼3.39

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: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_user_last_login_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Last Login
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.27 ▼0.291.67 ▼0.0738.38 ▼1.91
Dashboard /wp-admin2,195 ▲275.56 ▼0.0291.99 ▲2.3943.89 ▲1.74
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0438.94 ▲4.8637.53 ▲3.23
Add New Post /wp-admin/post-new.php1,534 ▲618.67 ▼4.47653.43 ▼53.8667.95 ▲15.72
Media Library /wp-admin/upload.php1,400 ▲34.18 ▲0.0091.74 ▼9.1943.01 ▼2.35

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_user_last_login_widget
    • db_upgraded
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/user-last-login/user-last-login-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/user-last-login/user-last-login.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

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

"User Last Login" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
82 characters long description:
Displays login datetime in manage users screen and sorts users by last login time.

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
Everything looks great! No dangerous files found in this plugin121 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP220103121

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity7.00
▷ Maximum class complexity11.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin