74% registration-page-shortcut

Code Review | Registration Page Shortcut

WordPress plugin Registration Page Shortcut scored74%from 54 tests.

About plugin

  • Plugin page: registration-page...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 19, 2015
  • Latest release: Nov 7, 2015
  • Number of updates: 15
  • Update frequency: every 11.5 days
  • Top authors: phplaw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,537 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.85ms] Passed 4 tests

An overview of server-side resources used by Registration Page Shortcut
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.16 ▼39.09
Dashboard /wp-admin2.08 ▼1.225.75 ▼47.79
Posts /wp-admin/edit.php2.08 ▼1.276.54 ▼43.35
Add New Post /wp-admin/post-new.php2.08 ▼3.807.03 ▼97.18
Media Library /wp-admin/upload.php2.08 ▼1.145.71 ▼34.50

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Registration Page Shortcut
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.221.63 ▲0.0143.14 ▼2.88
Dashboard /wp-admin2,198 ▲185.61 ▲0.0387.48 ▼17.9738.55 ▼3.98
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0439.61 ▲3.4735.25 ▼2.40
Add New Post /wp-admin/post-new.php1,526 ▼223.31 ▲0.29685.47 ▲24.1448.69 ▼8.12
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0393.49 ▼11.1243.19 ▼8.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the registration-page-shortcut handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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 everything seems fine, this is not 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/registration-page-shortcut/registration_page_shortcut.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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: shortcut, page, registration

registration-page-shortcut/registration_page_shortcut.php 92% from 13 tests

This is the main PHP file of "Registration Page Shortcut" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("registration-page-shortcut.php" instead of "registration_page_shortcut.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
Everything looks great! No dangerous files found in this plugin94 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP193780
JavaScript13514

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin