84% wp-one-login

Code Review | WP One Login

WordPress plugin WP One Login scored84%from 54 tests.

About plugin

  • Plugin page: wp-one-login
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Sep 23, 2021
  • Number of updates: 7
  • Update frequency: every 306.1 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,173 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.89ms] Passed 4 tests

Server-side resources used by WP One Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0049.21 ▲8.69
Dashboard /wp-admin3.31 ▲0.0048.94 ▼5.49
Posts /wp-admin/edit.php3.36 ▲0.0047.54 ▼4.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.68 ▼14.43
Media Library /wp-admin/upload.php3.23 ▲0.0039.49 ▲4.87

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP One Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.20 ▼1.382.06 ▲0.1237.02 ▼9.54
Dashboard /wp-admin2,221 ▲184.81 ▼0.0598.14 ▼16.5740.48 ▼7.92
Posts /wp-admin/edit.php2,097 ▼31.99 ▼0.0135.80 ▼1.8733.00 ▼0.83
Add New Post /wp-admin/post-new.php1,545 ▼223.11 ▼0.18671.63 ▲3.6177.51 ▲31.79
Media Library /wp-admin/upload.php1,400 ▲34.26 ▲0.05111.95 ▲5.3847.58 ▼1.13

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-one-login/wp-single-login.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: wp single login, single login, prevent concurrent login, prevent users from multiple login, concurrent login...

wp-one-login/wp-single-login.php 85% from 13 tests

The main file in "WP One Login" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-one-login.php" instead of "wp-single-login.php")

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
Good job! No executable or dangerous file extensions detected69 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1337767
Markdown1002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods433.33%
▷ Protected methods758.33%
▷ Private methods18.33%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin