84% wp-view-login-only

Code Review | WP view login only

WordPress plugin WP view login only scored84%from 54 tests.

About plugin

  • Plugin page: wp-view-login-only
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2017
  • Latest release: Jul 31, 2020
  • Number of updates: 15
  • Update frequency: every 77.5 days
  • Top authors: mel_cha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,188 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP view login only
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.98 ▼2.93
Dashboard /wp-admin3.33 ▲0.0253.08 ▲1.58
Posts /wp-admin/edit.php3.38 ▲0.0251.41 ▼1.89
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.87 ▼21.20
Media Library /wp-admin/upload.php3.25 ▲0.0236.21 ▼0.12
WP View Login Only /wp-admin/options-general.php?page=vlo3.2233.91

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP view login only
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▼0.241.96 ▲0.2944.16 ▲2.41
Dashboard /wp-admin2,202 ▲225.67 ▲0.0892.47 ▲1.8442.22 ▼6.60
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0434.36 ▼4.4737.26 ▼3.97
Add New Post /wp-admin/post-new.php1,548 ▲2223.02 ▲5.49659.68 ▲1.2852.97 ▼0.45
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.05110.09 ▲11.5049.85 ▲5.20
WP View Login Only /wp-admin/options-general.php?page=vlo7992.0626.2824.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 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-view-login-only/wp-view-login-only.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: lock, redirect, login, secret

wp-view-login-only/wp-view-login-only.php Passed 13 tests

The main file in "WP view login only" v. 1.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
If you view a website without log in, WordPress redirect to the login page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected176 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1164395
YAML261034
XML14725
Markdown112022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 1.63MB with 1.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-1554x500.png1,284.36KB462.39KB▼ 64.00%
.wordpress-org/banner-772x250.png382.95KB133.40KB▼ 65.17%