84% userlast

Code Review | UserLast

WordPress plugin UserLast scored84%from 54 tests.

About plugin

  • Plugin page: userlast
  • Plugin version: 1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-5.7.1
  • WordPress version: 6.3.1
  • First release: May 17, 2021
  • Latest release: May 31, 2021
  • Number of updates: 17
  • Update frequency: every 1.1 days
  • Top authors: codesprinters (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,969 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.14ms] Passed 4 tests

Analyzing server-side resources used by UserLast
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.35 ▼7.25
Dashboard /wp-admin3.34 ▲0.0346.77 ▼0.56
Posts /wp-admin/edit.php3.39 ▲0.0348.71 ▲1.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.46 ▼8.02
Media Library /wp-admin/upload.php3.26 ▲0.0333.28 ▼0.74

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for UserLast
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.121.98 ▲0.0439.14 ▼19.20
Dashboard /wp-admin2,206 ▲185.83 ▲0.9398.42 ▼18.1541.11 ▼6.05
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0239.53 ▲2.7935.07 ▼3.38
Add New Post /wp-admin/post-new.php1,514 ▼017.38 ▼0.29690.54 ▲29.7762.81 ▲14.48
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0198.58 ▼8.6847.00 ▲0.69

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/userlast/csuserlast.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: history, last, userlast, time, user...

userlast/csuserlast.php 92% from 13 tests

The primary PHP file in "UserLast" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("userlast.php" instead of "csuserlast.php")

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
Good job! No executable or dangerous file extensions detected100 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1318100

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG images were found in this plugin