84% wp-logged-in-only-basic

Code Review | WP Logged-in Only Basic

WordPress plugin WP Logged-in Only Basic scored84%from 54 tests.

About plugin

  • Plugin page: wp-logged-in-only...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Nov 16, 2019
  • Latest release: Nov 16, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: alignwebs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /443 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼14.45ms] Passed 4 tests

Server-side resources used by WP Logged-in Only Basic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.96 ▲6.04
Dashboard /wp-admin3.31 ▲0.0043.65 ▼10.67
Posts /wp-admin/edit.php3.36 ▲0.0040.94 ▼21.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.23 ▼30.43
Media Library /wp-admin/upload.php3.23 ▲0.0036.86 ▲4.29

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP Logged-in Only Basic: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼1.044.76 ▲2.9944.58 ▼1.72
Dashboard /wp-admin2,203 ▲155.86 ▲0.01128.13 ▲12.1155.79 ▲3.13
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0044.28 ▲3.0534.82 ▼1.76
Add New Post /wp-admin/post-new.php1,533 ▼823.18 ▲5.13665.98 ▼88.5554.39 ▼20.62
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.05123.27 ▼11.9554.91 ▲2.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-logged-in-only-basic/wp-logged-In-only.php:17

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: simple, authentication, login, protect, password...

wp-logged-in-only-basic/wp-logged-In-only.php 92% from 13 tests

"WP Logged-in Only Basic" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-logged-in-only-basic.php" instead of "wp-logged-In-only.php")

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
Everything looks great! No dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1298

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin