72% powerup

Code Review | Login Redirect, Logout Redirect, Hide Admin Bar, Disable Comments and more PowerUp WordPress Plugin

WordPress plugin Login Redirect, Logout Redirect, Hide Admin Bar, Disable Comments and more PowerUp WordPress Plugin scored72%from 54 tests.

About plugin

  • Plugin page: powerup
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 17
  • Update frequency: every 21.2 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /671 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.21MB] [CPU: ▼6.66ms] Passed 4 tests

A check of server-side resources used by Login Redirect, Logout Redirect, Hide Admin Bar, Disable Comments and more PowerUp WordPress Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1736.93 ▼4.53
Dashboard /wp-admin3.57 ▲0.2748.04 ▼4.26
Posts /wp-admin/edit.php3.63 ▲0.2648.99 ▲0.32
Add New Post /wp-admin/post-new.php6.09 ▲0.2083.52 ▼18.18
Media Library /wp-admin/upload.php3.44 ▲0.2047.84 ▲12.96
All Comments /wp-admin/edit-comments.php3.3227.01

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

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

Browser metrics Passed 4 tests

Login Redirect, Logout Redirect, Hide Admin Bar, Disable Comments and more PowerUp WordPress Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,614 ▼14714.55 ▼0.011.31 ▼0.3843.11 ▼2.21
Dashboard /wp-admin2,197 ▲235.60 ▼0.0685.02 ▼1.9985.20 ▲41.85
Posts /wp-admin/edit.php2,102 ▲21.95 ▼0.0334.72 ▼5.3632.30 ▼5.71
Add New Post /wp-admin/post-new.php1,680 ▲15221.80 ▼1.21721.25 ▲32.9954.85 ▼3.51
Media Library /wp-admin/upload.php1,399 ▼14.22 ▲0.0295.56 ▼13.1791.37 ▲44.70
All Comments /wp-admin/edit-comments.php280.420.083.38

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • gspu_plugin_version
    • widget_theysaidso_widget
    • db_upgraded
    • gspu_permalinks_flushed
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/powerup/includes/template.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(GSPU_PLUGIN_DIRincludes/helpers.php): failed to open stream: No such file or directory in wp-content/plugins/powerup/includes/plugin.php on line 25
    • > PHP Warning
      Use of undefined constant GSPU_PLUGIN_URI - assumed 'GSPU_PLUGIN_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/powerup/includes/template.php on line 10
    • > PHP Warning
      Use of undefined constant GSPU_PLUGIN_DIR - assumed 'GSPU_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/powerup/includes/plugin.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'GSPU_PLUGIN_DIRincludes/helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/powerup/includes/plugin.php on line 25
    • > PHP Fatal error
      Uncaught Error: Class 'PowerUp\\Base\\Module' not found in wp-content/plugins/powerup/includes/modules/restrict-wp-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PowerUp\\Base\\Module' not found in wp-content/plugins/powerup/includes/modules/disable-comments.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PowerUp\\Base\\Module' not found in wp-content/plugins/powerup/includes/modules/hide-admin-bar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PowerUp\\Base\\Module' not found in wp-content/plugins/powerup/includes/modules/redirection-rules.php:7
    • > PHP Warning
      Use of undefined constant GSPU_VERSION - assumed 'GSPU_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/powerup/includes/template.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/edit-comments.php
    • > Network (severe)
    wp-admin/edit-comments.php - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: registration redirect, disable comments, hide admin bar, login redirect, logout redirect

powerup/powerup.php 92% from 13 tests

Analyzing the main PHP file in "Login Redirect, Logout Redirect, Hide Admin Bar, Disable Comments and more PowerUp WordPress Plugin" version 1.0.2
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 detected981 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228239838
JavaScript1020698
SVG20042
CSS4153

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.44
▷ Minimum class complexity2.00
▷ Maximum class complexity28.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes450.00%
Methods90
▷ Static methods2022.22%
▷ Public methods90100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin