83% bns-support

Code Review | BNS Support

WordPress plugin BNS Support scored83%from 54 tests.

About plugin

  • Plugin page: bns-support
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2
  • WordPress version: 6.3.1
  • First release: Dec 27, 2009
  • Latest release: May 25, 2019
  • Number of updates: 45
  • Update frequency: every 76.4 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,469 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
Installer ran successfully

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

A check of server-side resources used by BNS Support
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.50 ▼1.04
Dashboard /wp-admin3.32 ▲0.0243.82 ▼3.14
Posts /wp-admin/edit.php3.44 ▲0.0845.59 ▼1.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.47 ▼3.60
Media Library /wp-admin/upload.php3.25 ▲0.0236.08 ▼0.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_bns-support
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for BNS Support
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.18 ▼1.472.04 ▲0.3439.66 ▼4.85
Dashboard /wp-admin2,203 ▲125.91 ▲0.01108.63 ▲5.6938.58 ▼5.60
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0939.76 ▼3.7235.32 ▼2.86
Add New Post /wp-admin/post-new.php1,514 ▼017.63 ▲0.06638.36 ▼100.4150.59 ▼2.59
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.0298.39 ▼2.9941.74 ▼1.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_bns-support
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bns-support/bns-support.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: widget-only, multisite compatible, widget, support

bns-support/bns-support.php 77% from 13 tests

The primary PHP file in "BNS Support" version 2.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("(.*)$|mi', $plugin_data, $domain_path );")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 465 characters long)
  • Domain Path: The domain path should be prefixed with a forward slash character ("/(.*)$|mi', $plugin_data, $domain_path );")

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 plugin436 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1247599433
CSS17173

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin