84% login-logout

Code Review | Login-Logout

WordPress plugin Login-Logout scored 84% from 54 tests.

About plugin

  • Plugin page: login-logout
  • Plugin version: 3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: May 12, 2011
  • Latest release: Sep 5, 2020
  • Number of updates: 57
  • Update frequency: every 59.7 days
  • Top authors: webvitaly (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

5,000+ active / 162,136 total downloads

Benchmarks

Plugin footprint 83% 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.07MB] [CPU: ▼6.46ms] Passed 4 tests

Server-side resources used by Login-Logout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.05 ▼2.60
Dashboard /wp-admin3.37 ▲0.0744.90 ▼7.67
Posts /wp-admin/edit.php3.42 ▲0.0643.56 ▼10.23
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.34 ▼5.32
Media Library /wp-admin/upload.php3.29 ▲0.0635.97 ▲5.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_login_logout
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Login-Logout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.451.70 ▼0.1243.74 ▼4.77
Dashboard /wp-admin2,206 ▲155.85 ▲0.93113.76 ▲12.3442.25 ▲1.68
Posts /wp-admin/edit.php2,086 ▼62.05 ▲0.0233.73 ▼5.7635.62 ▼2.77
Add New Post /wp-admin/post-new.php1,533 ▲1323.26 ▲0.17590.47 ▼73.4364.28 ▲17.73
Media Library /wp-admin/upload.php1,391 ▲94.21 ▼0.0193.41 ▼11.1041.40 ▼1.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_login_logout
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/login-logout/login-logout.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Login-Logout widget), #2 (Widget output when user is not logged in), #3 (Widget output when user is logged in), #4 (Widget output when user is logged in and inline option is on)
You can take inspiration from this readme.txt

login-logout/login-logout.php Passed 13 tests

The main file in "Login-Logout" v. 3.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
105 characters long description:
Show login or logout link. Show register or site-admin link. The replacement for the default Meta widget.

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
Success! There were no dangerous files found in this plugin559 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File5110130316
PHP12512243

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity7.80
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png1.45KB1.41KB▼ 2.76%
screenshot-1.png10.97KB10.91KB▼ 0.55%
screenshot-2.png0.92KB0.88KB▼ 4.15%
screenshot-4.png1.37KB1.33KB▼ 2.92%