63% login-dongle

Code Review | Login Dongle

WordPress plugin Login Dongle scored63%from 54 tests.

About plugin

  • Plugin page: login-dongle
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.0
  • WordPress version: 6.3.1
  • First release: Feb 9, 2012
  • Latest release: Oct 2, 2014
  • Number of updates: 141
  • Update frequency: every 6.9 days
  • Top authors: aercolino (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /24,872 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼12.02ms] Passed 4 tests

This is a short check of server-side resources used by Login Dongle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.79 ▲1.40
Dashboard /wp-admin3.45 ▲0.1146.88 ▼13.45
Posts /wp-admin/edit.php3.57 ▲0.2146.41 ▲2.03
Add New Post /wp-admin/post-new.php6.03 ▲0.1585.57 ▼38.04
Media Library /wp-admin/upload.php3.38 ▲0.1536.19 ▲3.21
Login Dongle /wp-admin/options-general.php?page=login_dongle_configuration3.3429.34

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login Dongle
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4713.95 ▼0.451.55 ▼0.3038.45 ▼4.37
Dashboard /wp-admin2,199 ▲255.50 ▼0.0782.08 ▼20.9539.74 ▼5.26
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0335.82 ▼5.5331.92 ▼9.56
Add New Post /wp-admin/post-new.php1,529 ▲322.71 ▼0.63591.20 ▼93.5558.74 ▼9.94
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.0397.29 ▼12.2849.94 ▲6.05
Login Dongle /wp-admin/options-general.php?page=login_dongle_configuration8052.0325.5025.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Compile error in wp-content/plugins/login-dongle/LoginDongle.php+3
    Cannot declare class LoginDongle, because the name is already in use
  • This plugin has failed uninstalling correctly, leaving 29 files (0.94MB) in the plugin directory
    • (new file) LoginDongleUpdater.php
    • (new file) LoginDonglePlugin.php
    • (new file) LoginDongleMail.php
    • (new file) LoginDongleOption.php
    • (new file) login-dongle.php
    • (new file) LoginDongleXmlrpcServer.php
    • (new file) LoginDongleUserAdmin.php
    • (new file) Ando/Version.php
    • (new file) LoginDongle.php
    • (new file) LoginDongleSiteAdmin.php
    • ...
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'wp_xmlrpc_server' not found in wp-content/plugins/login-dongle/LoginDongleXmlrpcServer.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/login-dongle/LoginDongle.php:10
    • > PHP Warning
      Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/login-dongle/uninstall.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === login-dongle === )
  • Tags: Please reduce the number of tags, currently 29 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Usage, case 2 - Logging in after clicking the bookmark.) image missing
Please take inspiration from this readme.txt

login-dongle/login-dongle.php 92% from 13 tests

This is the main PHP file of "Login Dongle" version 1.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Everything looks great! No dangerous files found in this plugin1,385 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11118325784
PO File4149184601

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.44
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1730.91%
▷ Public methods3767.27%
▷ Protected methods1832.73%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.84MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png48.74KB15.36KB▼ 68.48%
screenshot-4.png146.74KB43.30KB▼ 70.49%
screenshot-5.png147.50KB42.85KB▼ 70.95%
screenshot-1.png90.27KB29.16KB▼ 67.70%
screenshot-8.png68.79KB24.99KB▼ 63.68%