84% wp-force-login

Code Review | Force Login

WordPress plugin Force Login scored 84% from 54 tests.

About plugin

  • Plugin page: wp-force-login
  • Plugin version: 5.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Dec 6, 2022
  • Number of updates: 47
  • Update frequency: every 66.0 days
  • Top authors: kevinvess (100%)

Code review

54 tests

User reviews

94 reviews

Install metrics

30,000+ active / 3,018,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Force Login
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.61 ▼0.11
Dashboard /wp-admin3.32 ▲0.0243.87 ▼5.57
Posts /wp-admin/edit.php3.37 ▲0.0247.44 ▼1.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.44 ▼0.29
Media Library /wp-admin/upload.php3.24 ▲0.0135.79 ▲2.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Force Login
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.45 ▲0.072.21 ▲0.3938.28 ▼5.10
Dashboard /wp-admin2,206 ▲184.83 ▼0.05109.63 ▲3.4242.68 ▲0.24
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.46 ▲3.5035.69 ▼3.61
Add New Post /wp-admin/post-new.php1,535 ▲2123.37 ▲5.99632.69 ▼46.8453.84 ▼2.98
Media Library /wp-admin/upload.php1,388 ▲64.29 ▲0.0696.09 ▼5.1741.84 ▼1.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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/wp-force-login/wp-force-login.php:83

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The main PHP script in "Force Login" version 5.6.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 plugin42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1165042

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.86
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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 files were detected