83% loginrequirepress

Code Review | Login Require Press

WordPress plugin Login Require Press scored 83% from 54 tests.

About plugin

  • Plugin page: loginrequirepress
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-5.3
  • WordPress version: 6.3.1
  • First release: Feb 6, 2015
  • Latest release: Nov 27, 2019
  • Number of updates: 26
  • Update frequency: every 67.6 days
  • Top authors: maratbn (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 7,229 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.08ms] Passed 4 tests

An overview of server-side resources used by Login Require Press
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.01 ▼4.10
Dashboard /wp-admin3.39 ▲0.0845.05 ▼4.46
Posts /wp-admin/edit.php3.44 ▲0.0850.22 ▲0.21
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.50 ▲0.05
Media Library /wp-admin/upload.php3.31 ▲0.0837.12 ▲2.84
Login Require Press /wp-admin/options-general.php?page=plugin_LoginRequirePress_settings3.3034.57

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login Require Press
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.57 ▼0.811.80 ▲0.0240.64 ▼3.55
Dashboard /wp-admin2,213 ▲254.85 ▼1.0899.52 ▼4.8639.81 ▼0.89
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0438.63 ▼1.2134.52 ▲0.93
Add New Post /wp-admin/post-new.php6,469 ▲4,93620.15 ▼3.12879.15 ▲245.4549.43 ▼9.44
Media Library /wp-admin/upload.php1,395 ▲134.22 ▲0.0095.26 ▼3.9541.47 ▼1.13
Login Require Press /wp-admin/options-general.php?page=plugin_LoginRequirePress_settings9152.1522.1830.43

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 were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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/loginrequirepress/LoginRequirePress.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Login Require Press configuration screen with the table used to specify which posts are to be login-protected.), #2 (Login Require Press configuration screen with the lists of private, non-private login-protected, and passcode-protected posts.), #3 (Login Require Press edit post meta box to enable or disable login protection.)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

loginrequirepress/LoginRequirePress.php 85% from 13 tests

The primary PHP file in "Login Require Press" version 1.4.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("loginrequirepress.php" instead of "LoginRequirePress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected372 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17572372

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
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
Namespaces1
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%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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