73% login-devices

Code Review | FS Login Devices

WordPress plugin FS Login Devices scored 73% from 54 tests.

About plugin

  • Plugin page: login-devices
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2021
  • Latest release: Apr 2, 2023
  • Number of updates: 5
  • Update frequency: every 130.8 days
  • Top authors: fsylum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 612 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.33ms] Passed 4 tests

An overview of server-side resources used by FS Login Devices
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.03 ▲3.08
Dashboard /wp-admin3.33 ▲0.0243.28 ▼2.52
Posts /wp-admin/edit.php3.44 ▲0.0848.80 ▲4.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.50 ▼8.54
Media Library /wp-admin/upload.php3.25 ▲0.0234.78 ▲2.67
Login Devices /wp-admin/users.php?page=fs-login-devices3.3034.40

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: 1 new table, 7 new options
New tables
wp_fs_login_devices
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
fs_login_devices_db_version
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by FS Login Devices
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.66 ▼0.711.73 ▼0.2844.61 ▼0.56
Dashboard /wp-admin2,210 ▲224.86 ▼0.0197.57 ▼5.4839.96 ▼5.84
Posts /wp-admin/edit.php2,093 ▲42.13 ▲0.0834.53 ▲0.4733.39 ▼0.46
Add New Post /wp-admin/post-new.php1,539 ▲2523.22 ▲5.74707.05 ▲6.6050.27 ▼3.73
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.0691.30 ▼7.8441.14 ▼2.81
Login Devices /wp-admin/users.php?page=fs-login-devices1,1352.3338.7131.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 plugin did not uninstall successfully, leaving 1 table in the database
    • wp_fs_login_devices
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_login_devices_db_version
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/login-devices/fs-login-devices.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\LoginDevices\\Contracts\\Runnable' not found in wp-content/plugins/login-devices/src/WP/Auth.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\LoginDevices\\Contracts\\Runnable' not found in wp-content/plugins/login-devices/src/WP/Asset.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/login-devices/src/WP/ListTables/DeviceListTable.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\LoginDevices\\Contracts\\Runnable' not found in wp-content/plugins/login-devices/src/WP/Admin.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: user-agent, session, user, auth

login-devices/fs-login-devices.php 77% from 13 tests

The main file in "FS Login Devices" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("8.0" instead of "7.3")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.9" instead of "5.6")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("login-devices.php" instead of "fs-login-devices.php")

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 plugin1,076 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP202442921,065
JSON2009
CSS1001
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.79
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods74
▷ Static methods2229.73%
▷ Public methods6993.24%
▷ Protected methods22.70%
▷ Private methods34.05%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants11
▷ Global constants436.36%
▷ Class constants763.64%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin