84% bns-helpers

Code Review | BNS Helpers

WordPress plugin BNS Helpers scored84%from 54 tests.

About plugin

  • Plugin page: bns-helpers
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: Apr 10, 2016
  • Number of updates: 8
  • Update frequency: every 57.6 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,144 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.20ms] Passed 4 tests

Analyzing server-side resources used by BNS Helpers
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0656.74 ▲3.87
Dashboard /wp-admin3.36 ▲0.0586.78 ▲17.02
Posts /wp-admin/edit.php3.41 ▲0.0561.25 ▼5.37
Add New Post /wp-admin/post-new.php5.94 ▲0.05106.91 ▼33.47
Media Library /wp-admin/upload.php3.28 ▲0.0548.94 ▼1.81

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BNS Helpers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲11613.75 ▼0.8114.48 ▲12.1355.82 ▲3.67
Dashboard /wp-admin2,192 ▲155.66 ▲0.01118.93 ▼13.5452.34 ▼4.33
Posts /wp-admin/edit.php2,103 ▼01.99 ▲0.0243.61 ▼4.8644.33 ▲3.88
Add New Post /wp-admin/post-new.php1,404 ▼018.36 ▲0.52797.70 ▲29.3352.31 ▼20.97
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.03123.34 ▼2.6449.94 ▼6.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bns-helpers/bns-helpers.php:80

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: plugin-only, child-pages, bns login, text widgets, shortcodes

bns-helpers/bns-helpers.php Passed 13 tests

The main PHP script in "BNS Helpers" version 0.3 is automatically included on every request by WordPress
55 characters long description:
A collections of shortcodes and other helpful functions

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
There were no executable files found in this plugin229 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1100244205
CSS132617
JavaScript14377

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin