84% redirect-anonymous-users

Code Review | Redirect anonymous users

WordPress plugin Redirect anonymous users scored 84% from 54 tests.

About plugin

  • Plugin page: redirect-anonymou...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 27, 2016
  • Latest release: Jul 27, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ManuelRazzari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,158 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.15ms] Passed 4 tests

This is a short check of server-side resources used by Redirect anonymous users
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.47 ▲2.00
Dashboard /wp-admin3.32 ▲0.0249.12 ▲2.95
Posts /wp-admin/edit.php3.37 ▲0.0141.04 ▼6.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.42 ▼14.89
Media Library /wp-admin/upload.php3.24 ▲0.0139.47 ▲7.47
Redirect anonymous /wp-admin/options-general.php?page=redirect_anon_settings3.2136.55

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Redirect anonymous users
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.63 ▼0.601.97 ▲0.2254.94 ▲9.12
Dashboard /wp-admin2,198 ▲105.85 ▲0.97110.91 ▲6.2452.50 ▲4.26
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0340.04 ▼4.2635.93 ▼2.09
Add New Post /wp-admin/post-new.php1,670 ▲13722.04 ▼1.17903.56 ▲241.5197.12 ▲42.25
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.00112.14 ▼0.7848.91 ▼10.77
Redirect anonymous /wp-admin/options-general.php?page=redirect_anon_settings7952.0528.2931.37

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redirect-anonymous-users/redirect_anon.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
3 plugin tags: redirect, membership, launch

redirect-anonymous-users/redirect_anon.php 92% from 13 tests

The main file in "Redirect anonymous users" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("redirect-anonymous-users.php" instead of "redirect_anon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191246

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions5
▷ Named functions5100.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 are no PNG files in this plugin