83% nice-login-register-widget

Code Review | Nice Login Widget

WordPress plugin Nice Login Widget scored83%from 54 tests.

About plugin

  • Plugin page: nice-login-regist...
  • Plugin version: 1.3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Apr 4, 2013
  • Latest release: Sep 30, 2014
  • Number of updates: 36
  • Update frequency: every 15.1 days
  • Top authors: sgPlanwize (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

900+ active /84,126 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.11MB] [CPU: ▼6.87ms] Passed 4 tests

This is a short check of server-side resources used by Nice Login Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.65 ▼3.04
Dashboard /wp-admin3.42 ▲0.1147.85 ▼7.79
Posts /wp-admin/edit.php3.53 ▲0.1750.47 ▲0.36
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.73 ▼17.00
Media Library /wp-admin/upload.php3.34 ▲0.1038.40 ▲1.16

Server storage [IO: ▲0.27MB] [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: 32 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
nlw_version
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_pw_login_widget
widget_recent-posts

Browser metrics Passed 4 tests

Nice Login Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,720 ▼1,04110.84 ▼3.566.45 ▲4.8541.57 ▲1.63
Dashboard /wp-admin2,186 ▲125.56 ▼0.1190.83 ▼6.3550.57 ▲9.91
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.1136.59 ▼7.6836.57 ▼2.83
Add New Post /wp-admin/post-new.php1,525 ▼1223.60 ▲5.35670.17 ▼24.7038.63 ▼37.40
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.0099.22 ▼4.3044.86 ▼1.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_pw_login_widget
    • nlw_version
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not an exhaustive test

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nice-login-register-widget/pw-login-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_transient() in wp-content/plugins/nice-login-register-widget/nlw-about.php:3

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 90% from 29 tests

readme.txt 88% 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 require attention:
  • Donate link: Invalid URI found ("")
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

nice-login-register-widget/pw-login-widget.php 92% from 13 tests

The main PHP script in "Nice Login Widget" version 1.3.10 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nice-login-register-widget.php" instead of "pw-login-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,362 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PO File105206371,383
PHP3219106750
CSS1281121
JavaScript2414108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity34.33
▷ Minimum class complexity14.00
▷ Maximum class complexity46.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1575.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tick.png0.52KB0.52KB0.00%
images/NLW25x23.png1.52KB1.48KB▼ 2.44%