10% bracketpress-login-and-registration-widget

Code Review | BracketPress Login Widget

WordPress plugin BracketPress Login Widget scored10%from 54 tests.

About plugin

  • Plugin page: bracketpress-logi...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 19, 2013
  • Latest release: Feb 27, 2013
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: ntemple (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,890 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/bracketpress-login-and-registration-widget/bracketpress-login.php+13
    constant(): Couldn't find constant BRACKETPRESS_DEBUG

Server metrics [RAM: ▼1.83MB] [CPU: ▼52.57ms] Passed 4 tests

This is a short check of server-side resources used by BracketPress Login Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.49 ▼39.48
Dashboard /wp-admin2.17 ▼1.135.92 ▼44.43
Posts /wp-admin/edit.php2.17 ▼1.188.13 ▼38.40
Add New Post /wp-admin/post-new.php2.17 ▼3.715.92 ▼87.98
Media Library /wp-admin/upload.php2.17 ▼1.065.46 ▼30.66

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for BracketPress Login Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.20 ▼1.161.67 ▼0.6940.80 ▼4.34
Dashboard /wp-admin2,206 ▲214.84 ▼0.98108.71 ▲0.3938.61 ▼9.37
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0240.55 ▲1.3034.73 ▼1.23
Add New Post /wp-admin/post-new.php1,522 ▲823.04 ▲5.57669.02 ▼31.3555.51 ▲0.59
Media Library /wp-admin/upload.php1,382 ▼34.25 ▲0.0095.42 ▼6.9442.41 ▼2.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/bracketpress-login-and-registration-widget/bracketpress-login.php+13
    constant(): Couldn't find constant BRACKETPRESS_DEBUG
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bracketpress-login-and-registration-widget/bracketpress-login.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: login, register, bracketpress

bracketpress-login-and-registration-widget/bracketpress-login.php 92% from 13 tests

The primary PHP file in "BracketPress Login Widget" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bracketpress-login-and-registration-widget.php" instead of "bracketpress-login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected387 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15220217
CSS1253156
JavaScript10013
HTML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity5.80
▷ Minimum method complexity2.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected