84% bns-login

Code Review | BNS Login

WordPress plugin BNS Login scored84%from 54 tests.

About plugin

  • Plugin page: bns-login
  • Plugin version: 2.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Aug 16, 2009
  • Latest release: Feb 20, 2018
  • Number of updates: 61
  • Update frequency: every 51.0 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /10,692 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.86ms] Passed 4 tests

A check of server-side resources used by BNS Login
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.07 ▲0.71
Dashboard /wp-admin3.32 ▲0.0145.16 ▼4.53
Posts /wp-admin/edit.php3.37 ▲0.0151.12 ▲6.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.44 ▼2.84
Media Library /wp-admin/upload.php3.24 ▲0.0135.57 ▼0.79

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for BNS Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.67 ▼0.641.69 ▼0.2540.31 ▼4.11
Dashboard /wp-admin2,209 ▲245.90 ▲1.02104.26 ▼8.5441.21 ▼6.04
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0440.22 ▲5.7736.42 ▼1.98
Add New Post /wp-admin/post-new.php1,534 ▲1422.99 ▼0.14679.78 ▲16.2252.63 ▼7.29
Media Library /wp-admin/upload.php1,385 ▼64.21 ▲0.0495.44 ▼8.8040.44 ▼2.71

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bns-login/bns-login.php:109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: plugin-only, dashboard, admin, footer, login...

bns-login/bns-login.php 92% from 13 tests

The entry point to "BNS Login" version 2.5.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 194 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin395 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1110341229
CSS2196498
PO File1202068

PHP code Passed 2 tests

An short overview of 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.25
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected