89% dologin

Code Review | DoLogin Security

WordPress plugin DoLogin Security scored 89% from 54 tests.

About plugin

  • Plugin page: dologin
  • Plugin version: 3.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2019
  • Latest release: Sep 13, 2023
  • Number of updates: 67
  • Update frequency: every 21.6 days
  • Top authors: wpdo5ea (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active / 108,974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▲2.25ms] Passed 4 tests

An overview of server-side resources used by DoLogin Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3641.48 ▼0.27
Dashboard /wp-admin3.77 ▲0.4751.96 ▲4.07
Posts /wp-admin/edit.php3.82 ▲0.4647.98 ▲4.66
Add New Post /wp-admin/post-new.php6.29 ▲0.4193.87 ▲0.53
Media Library /wp-admin/upload.php3.63 ▲0.4043.01 ▲9.25
DoLogin Security /wp-admin/options-general.php?page=dologin3.6746.53

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 50 new files
Database: 3 new tables, 22 new options
New tables
wp_dologin_failure
wp_dologin_sms
wp_dologin_pswdless
New WordPress options
dologin.gg
dologin.max_retries
dologin._ver
dologin.gg_priv_key
widget_recent-posts
dologin.recapt_forget
dologin.2fa_force
widget_theysaidso_widget
theysaidso_admin_options
dologin.whitelist
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for DoLogin Security
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17113.60 ▼0.601.53 ▼0.2332.31 ▼8.10
Dashboard /wp-admin2,282 ▲944.83 ▼1.21105.36 ▼0.4442.17 ▲0.55
Posts /wp-admin/edit.php2,072 ▼172.01 ▲0.0135.64 ▼3.3330.56 ▼1.99
Add New Post /wp-admin/post-new.php1,547 ▲1318.54 ▼4.64625.82 ▲12.4876.35 ▲14.42
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0298.36 ▼5.7741.54 ▼4.60
DoLogin Security /wp-admin/options-general.php?page=dologin1,5271.8627.1342.04

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 22 options in the database
    • dologin._ver
    • dologin.blacklist
    • dologin.sms_force
    • dologin.recapt_register
    • can_compress_scripts
    • dologin.max_retries
    • db_upgraded
    • dologin.recapt_forget
    • dologin.gg_pub_key
    • dologin.gg_priv_key
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: login security, geolocation login limit, limit login attempts, passwordless login, 2fa login

dologin/dologin.php 85% from 13 tests

The main PHP file in "DoLogin Security" ver. 3.7.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 241 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "1.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin4,337 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP327621,1963,355
CSS1184133804
JavaScript2219136
SQL30032
SVG10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity24.73
▷ Minimum class complexity2.00
▷ Maximum class complexity64.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes00.00%
Methods175
▷ Static methods5632.00%
▷ Public methods14683.43%
▷ Protected methods74.00%
▷ Private methods2212.57%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants50
▷ Global constants2652.00%
▷ Class constants2448.00%
▷ Public constants24100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.55MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp_assets/screenshot-8.png63.59KB23.69KB▼ 62.75%
wp_assets/icon-256x256.png19.41KB5.48KB▼ 71.77%
wp_assets/screenshot-3.png51.20KB18.52KB▼ 63.84%
wp_assets/screenshot-4.png36.30KB10.15KB▼ 72.05%
wp_assets/screenshot-2.png82.89KB29.73KB▼ 64.14%