83% wps-limit-login

Code Review | WPS Limit Login

WordPress plugin WPS Limit Login scored83%from 54 tests.

About plugin

  • Plugin page: wps-limit-login
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Aug 24, 2023
  • Number of updates: 44
  • Update frequency: every 45.5 days
  • Top authors: NicolasKulka (100%)

Code review

54 tests

User reviews

78 reviews

Install metrics

60,000+ active /433,254 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼0.38ms] 75% from 4 tests

This is a short check of server-side resources used by WPS Limit Login
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 5,050.00ms on /wp-admin/options-general.php?page=wps-limit-login)
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3543.13 ▲1.48
Dashboard /wp-admin3.68 ▲0.3755.23 ▲2.99
Posts /wp-admin/edit.php3.72 ▲0.3752.17 ▲3.22
Add New Post /wp-admin/post-new.php6.19 ▲0.3090.80 ▼9.22
Media Library /wp-admin/upload.php3.53 ▲0.3040.49 ▲7.10
WPS Limit Login /wp-admin/options-general.php?page=wps-limit-login3.555,050.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 91 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WPS Limit Login: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.61 ▼0.812.09 ▲0.1443.87 ▼1.04
Dashboard /wp-admin2,243 ▲555.81 ▼0.0699.01 ▼20.6738.61 ▼7.80
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0436.12 ▼0.9537.00 ▼0.90
Add New Post /wp-admin/post-new.php1,536 ▼623.13 ▲5.03653.78 ▼19.1347.60 ▼8.25
Media Library /wp-admin/upload.php1,395 ▲134.22 ▼0.02101.94 ▼9.8746.88 ▲3.21
WPS Limit Login /wp-admin/options-general.php?page=wps-limit-login1,1004.7541.9282.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 14× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wps-limit-login/blocks/menu.php
    • > /wp-content/plugins/wps-limit-login/blocks/whitelist.php
    • > /wp-content/plugins/wps-limit-login/blocks/pub.php
    • > /wp-content/plugins/wps-limit-login/classes/plugin.php
    • > /wp-content/plugins/wps-limit-login/blocks/blacklist.php
    • > /wp-content/plugins/wps-limit-login/classes/singleton.php
    • > /wp-content/plugins/wps-limit-login/wps-limit-login.php
    • > /wp-content/plugins/wps-limit-login/admin_page/options.php
    • > /wp-content/plugins/wps-limit-login/blocks/log.php
    • > /wp-content/plugins/wps-limit-login/blocks/pub-wpserveur.php

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

wps-limit-login/wps-limit-login.php 85% from 13 tests

This is the main PHP file of "WPS Limit Login" version 1.5.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected14,217 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
SVG40167,499
PO File171,9522,8164,050
PHP256076742,098
CSS210035534
JSON20035
JavaScript1041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity39.12
▷ Minimum class complexity1.00
▷ Maximum class complexity220.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods99
▷ Static methods2727.27%
▷ Public methods9393.94%
▷ Protected methods44.04%
▷ Private methods22.02%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants7100.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
3 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-icon-32.png2.81KB1.41KB▼ 49.95%
assets/img/check-and-tools-logo-in-plugin.png39.55KB7.80KB▼ 80.28%
assets/img/wps-limit-login-logo.png39.38KB7.63KB▼ 80.64%