67% visitor-force-login-page

Code Review | Visitor force login page

WordPress plugin Visitor force login page scored67%from 54 tests.

About plugin

  • Plugin page: visitor-force-log...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 17, 2020
  • Latest release: May 25, 2023
  • Number of updates: 9
  • Update frequency: every 136.1 days
  • Top authors: sumitsingh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /864 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▼0.96MB] [CPU: ▼43.46ms] Passed 4 tests

A check of server-side resources used by Visitor force login page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.17 ▲2.46
Dashboard /wp-admin3.00 ▼0.3526.22 ▼38.72
Posts /wp-admin/edit.php3.00 ▼0.3626.26 ▼38.08
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.14 ▼83.87
Media Library /wp-admin/upload.php3.00 ▼0.2326.77 ▼13.17
Visitor force page /wp-admin/options-general.php?page=visitor_force_page3.0027.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Visitor force login page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.40 ▲0.192.08 ▲0.3344.13 ▼0.50
Dashboard /wp-admin2,202 ▲225.62 ▼0.0589.19 ▼0.3137.51 ▼4.38
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0233.61 ▼6.0833.55 ▼5.06
Add New Post /wp-admin/post-new.php1,548 ▲1723.32 ▲0.16681.97 ▲30.2856.20 ▲4.22
Media Library /wp-admin/upload.php1,401 ▲14.31 ▲0.07104.43 ▼3.0148.72 ▲6.58
Visitor force page /wp-admin/options-general.php?page=visitor_force_page8122.0232.2729.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=visitor_force_page
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/visitor-force-login-page/visitor-force-login-page.php:33

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% 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:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: A description for screenshot #2 is missing in visitor-force-login-page/assets to your readme.txt
You can take inspiration from this readme.txt

visitor-force-login-page/visitor-force-login-page.php 77% from 13 tests

The entry point to "Visitor force login page" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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
There were not PNG files found in your plugin