10% browserstack

Code Review | BrowserStack for WordPress

WordPress plugin BrowserStack for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: browserstack
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.1.1
  • WordPress version: 6.3.1
  • First release: May 15, 2019
  • Latest release: Oct 15, 2019
  • Number of updates: 6
  • Update frequency: every 27.7 days
  • Top authors: browserstack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,593 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/browserstack/src/admin_bar.php+8
    Undefined variable: browserstackSettings

Server metrics [RAM: ▼1.88MB] [CPU: ▼52.24ms] Passed 4 tests

Server-side resources used by BrowserStack for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.97 ▼36.73
Dashboard /wp-admin2.13 ▼1.188.38 ▼41.36
Posts /wp-admin/edit.php2.13 ▼1.235.96 ▼41.63
Add New Post /wp-admin/post-new.php2.13 ▼3.766.03 ▼89.24
Media Library /wp-admin/upload.php2.13 ▼1.106.06 ▼27.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
draft_public_preview_field
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
preview_key_field
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for BrowserStack for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲13513.23 ▼1.421.75 ▲0.1142.48 ▼2.98
Dashboard /wp-admin2,250 ▲625.84 ▲0.97103.13 ▼13.9182.74 ▲37.01
Posts /wp-admin/edit.php2,150 ▲612.00 ▼0.0334.15 ▼0.0431.53 ▼4.47
Add New Post /wp-admin/post-new.php1,744 ▲21624.60 ▲1.30656.82 ▼28.6553.41 ▲4.77
Media Library /wp-admin/upload.php1,444 ▲534.19 ▼0.06113.17 ▲14.3044.17 ▲0.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/browserstack/src/admin_bar.php+8
    Undefined variable: browserstackSettings
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

browserstack/index.php 92% from 13 tests

"BrowserStack for WordPress" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("browserstack.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected402 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP56641295
CSS214062
SVG20045

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity6.62
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes228.57%
Methods31
▷ Static methods13.23%
▷ Public methods2683.87%
▷ Protected methods516.13%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin