84% primary-login-logout-menu

Code Review | Primary-Login-Logout-Menu

WordPress plugin Primary-Login-Logout-Menu scored84%from 54 tests.

About plugin

  • Plugin page: primary-login-log...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Oct 17, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: aniljbsf.io (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.50ms] Passed 4 tests

An overview of server-side resources used by Primary-Login-Logout-Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.32 ▲4.79
Dashboard /wp-admin3.33 ▲0.0350.53 ▼2.77
Posts /wp-admin/edit.php3.38 ▲0.0352.03 ▼2.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.63 ▼11.48
Media Library /wp-admin/upload.php3.25 ▲0.0237.01 ▼1.50
Primary Login/Logout /wp-admin/options-general.php?page=primary_login_logout_settings3.2230.38

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Primary-Login-Logout-Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3514.80 ▲0.431.78 ▼0.4044.24 ▲1.69
Dashboard /wp-admin2,221 ▲245.83 ▲0.86103.65 ▼1.0939.39 ▼6.96
Posts /wp-admin/edit.php2,106 ▲92.02 ▲0.0040.97 ▲2.8636.48 ▲1.73
Add New Post /wp-admin/post-new.php1,534 ▲317.81 ▼5.34609.74 ▼75.5053.14 ▲1.46
Media Library /wp-admin/upload.php1,403 ▲94.23 ▲0.00102.90 ▼10.1241.00 ▼8.79
Primary Login/Logout /wp-admin/options-general.php?page=primary_login_logout_settings8062.1522.9026.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/primary-login-logout-menu/classes/class-bsf-menu-loader.php:110
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/primary-login-logout-menu/includes/primary-login-logout-options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/primary-login-logout-menu/includes/class-bsf-primary-menu.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/primary-login-logout-menu/classes/class-bsf-menu-loader.php:110

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: login-redirect, primary-login-menu, login-logout

primary-login-logout-menu/primary-login-logout-menu.php 85% from 13 tests

The primary PHP file in "Primary-Login-Logout-Menu" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 201 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin118 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4228494
Markdown17015
CSS1109

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods222.22%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin