84% wp-loginout

Code Review | WP LogInOut

WordPress plugin WP LogInOut scored 84% from 54 tests.

About plugin

  • Plugin page: wp-loginout
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2014
  • Latest release: Oct 29, 2021
  • Number of updates: 9
  • Update frequency: every 284.8 days
  • Top authors: nabtron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,126 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.15ms] Passed 4 tests

This is a short check of server-side resources used by WP LogInOut
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.49 ▼5.13
Dashboard /wp-admin3.32 ▲0.0245.04 ▼1.92
Posts /wp-admin/edit.php3.37 ▲0.0244.65 ▼2.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.49 ▼2.74
Media Library /wp-admin/upload.php3.25 ▲0.0233.31 ▼1.45
WP LoginOut /wp-admin/themes.php?page=wp_loginout_options3.2131.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP LogInOut
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.30 ▼0.951.62 ▼0.3841.75 ▲0.64
Dashboard /wp-admin2,210 ▲225.79 ▲0.9298.79 ▼6.8938.16 ▼5.94
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0134.88 ▲1.2432.05 ▼1.77
Add New Post /wp-admin/post-new.php1,517 ▼2517.68 ▼0.98587.18 ▼57.3943.63 ▼10.45
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.2393.49 ▼4.2846.24 ▲2.10
WP LoginOut /wp-admin/themes.php?page=wp_loginout_options8162.0523.5331.15

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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: Call to undefined function add_action() in wp-content/plugins/wp-loginout/wp-loginout.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #1 (This screenshot shows the admin panel settings for the plugin.) image required
You can take inspiration from this readme.txt

wp-loginout/wp-loginout.php Passed 13 tests

Analyzing the main PHP file in "WP LogInOut" version 0.1.5
121 characters long description:
Goto: Appearance > WP LoginOut. Add login / out buttons in selected menu automatically depending upon users login status.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected83 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162583

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png32.79KB11.76KB▼ 64.13%