72% wp-welcome-gate

Code Review | Wordpress Welcome Redirect

WordPress plugin Wordpress Welcome Redirect scored72%from 54 tests.

About plugin

  • Plugin page: wp-welcome-gate
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2014
  • Latest release: Oct 14, 2014
  • Number of updates: 27
  • Update frequency: every 4.0 days
  • Top authors: robertjaneson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,722 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.44ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Welcome Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.25 ▼0.75
Dashboard /wp-admin3.36 ▲0.0148.44 ▼10.42
Posts /wp-admin/edit.php3.41 ▲0.0543.60 ▲1.16
Add New Post /wp-admin/post-new.php5.94 ▲0.0680.96 ▼25.44
Media Library /wp-admin/upload.php3.28 ▲0.0533.18 ▼1.13
WP Welcome Redirect /wp-admin/options-general.php?page=wpwr-options3.2328.57

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
wpwr-type
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Welcome Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.73 ▲0.383.11 ▲1.4049.75 ▲6.88
Dashboard /wp-admin2,199 ▲245.55 ▼0.1791.48 ▼19.9038.54 ▼5.19
Posts /wp-admin/edit.php2,104 ▲11.98 ▲0.0033.75 ▼10.2934.37 ▼3.86
Add New Post /wp-admin/post-new.php6,231 ▲4,69418.98 ▲0.79899.45 ▲245.9172.60 ▲25.30
Media Library /wp-admin/upload.php1,407 ▲74.17 ▲0.01105.97 ▲5.2145.77 ▲0.37
WP Welcome Redirect /wp-admin/options-general.php?page=wpwr-options1,0382.0731.3378.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • wpwr-type
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wpwr-options
    • > Notice in wp-content/plugins/wp-welcome-gate/wordpress-welcome-redirect.php+165
    Undefined index: redirect-type

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 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/wp-welcome-gate/wordpress-welcome-redirect.php:107

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wpwr-options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'mozilla')" "TypeError: Cannot read properties of undefined (reading 'mozilla')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-welcome-gate//js/wp-welcome-gate.js?ver=6.3.1:5:24)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wpwr-options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'mozilla')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: welcome gate, permalink redirect, welcome redirect, wordpress redirection, landing page...

wp-welcome-gate/wordpress-welcome-redirect.php 92% from 13 tests

The main PHP file in "Wordpress Welcome Redirect" ver. 2.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-welcome-gate.php" instead of "wordpress-welcome-redirect.php")

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 plugin5,884 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS11,36455,530
PHP144117341
JavaScript11013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fb.png1.86KB0.86KB▼ 53.60%
images/support-icon.png1.55KB0.82KB▼ 47.36%
images/wordpress-logo.png8.38KB4.84KB▼ 42.19%
images/wp-icon.png10.62KB5.99KB▼ 43.53%
images/twitter.png2.35KB1.24KB▼ 47.13%