84% gp-require-login

Code Review | GP Require Login

WordPress plugin GP Require Login scored84%from 54 tests.

About plugin

  • Plugin page: gp-require-login
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Nov 3, 2016
  • Latest release: Apr 17, 2023
  • Number of updates: 15
  • Update frequency: every 157.1 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

This is a short check of server-side resources used by GP Require Login
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.72 ▼1.28
Dashboard /wp-admin3.32 ▼0.0346.22 ▼13.49
Posts /wp-admin/edit.php3.37 ▲0.0147.95 ▲0.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.73 ▼17.13
Media Library /wp-admin/upload.php3.24 ▲0.0137.87 ▲2.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for GP Require Login
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.101.71 ▲0.1338.39 ▼0.66
Dashboard /wp-admin2,192 ▲115.62 ▼0.0988.82 ▼16.1440.66 ▼4.07
Posts /wp-admin/edit.php2,100 ▲181.97 ▼0.0339.91 ▲3.0240.92 ▲4.64
Add New Post /wp-admin/post-new.php1,528 ▲222.73 ▼0.25665.52 ▲61.0156.62 ▲11.31
Media Library /wp-admin/upload.php1,400 ▲64.15 ▼0.12113.87 ▲15.5848.14 ▲1.74

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-require-login/gp-require-login.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were 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
2 plugin tags: glotpress, translation

gp-require-login/gp-require-login.php Passed 13 tests

The main PHP script in "GP Require Login" version 0.6 is automatically included on every request by WordPress
47 characters long description:
Redirect non-logged in users to the login page.

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
Success! There were no dangerous files found in this plugin37 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171837

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin