84% wp-last-login

Code Review | WP Last Login

WordPress plugin WP Last Login scored84%from 54 tests.

About plugin

  • Plugin page: wp-last-login
  • Plugin version: 5...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2012
  • Latest release: Nov 12, 2022
  • Number of updates: 27
  • Update frequency: every 155.1 days
  • Top authors: obenland (62.96%)kobenland (40.74%)

Code review

54 tests

User reviews

21 reviews

Install metrics

10,000+ active /113,483 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.79ms] Passed 4 tests

Analyzing server-side resources used by WP Last Login
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.97 ▼16.81
Dashboard /wp-admin3.37 ▲0.0642.13 ▼11.53
Posts /wp-admin/edit.php3.48 ▲0.1348.35 ▲5.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.53 ▲1.85
Media Library /wp-admin/upload.php3.29 ▲0.0634.03 ▼0.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Last Login
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.34 ▼0.961.79 ▲0.1338.49 ▲2.59
Dashboard /wp-admin2,209 ▲184.84 ▼0.04101.63 ▼15.1439.16 ▼3.43
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0340.14 ▲1.6536.72 ▼0.02
Add New Post /wp-admin/post-new.php1,546 ▲2718.72 ▼2.28598.30 ▼101.3579.60 ▲28.41
Media Library /wp-admin/upload.php1,382 ▼04.20 ▼0.0395.43 ▼7.0939.59 ▼5.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Obenland_Wp_Plugins_V5' not found in wp-content/plugins/wp-last-login/class-obenland-wp-last-login.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-last-login/class-obenland-wp-plugins-v5.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-last-login/uninstall.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: user, admin, last login, login, login date...

wp-last-login/wp-last-login.php 92% from 13 tests

The principal PHP file in "WP Last Login" v. 5... is loaded by WordPress automatically on each request
You should first fix the following items:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "5...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin678 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PO File12119288459
PHP447269219

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.50
▷ Minimum class complexity7.00
▷ Maximum class complexity8.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods212.50%
▷ Private methods16.25%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin