89% trigger-browsersync

Code Review | Trigger Browsersync

WordPress plugin Trigger Browsersync scored89%from 54 tests.

About plugin

  • Plugin page: trigger-browsersync
  • Plugin version: 0.8.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1+
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Jun 23, 2022
  • Number of updates: 23
  • Update frequency: every 82.7 days
  • Top authors: Patabugen (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.25ms] Passed 4 tests

An overview of server-side resources used by Trigger Browsersync
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.94 ▼1.24
Dashboard /wp-admin3.35 ▼0.0043.83 ▼18.23
Posts /wp-admin/edit.php3.40 ▲0.0447.18 ▲0.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.46 ▼21.71
Media Library /wp-admin/upload.php3.27 ▲0.0433.44 ▲2.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Trigger Browsersync
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲1.371.64 ▲0.0441.59 ▼2.42
Dashboard /wp-admin2,195 ▲215.59 ▲0.0184.98 ▼0.8339.09 ▼1.66
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0436.11 ▼4.4235.20 ▲1.27
Add New Post /wp-admin/post-new.php1,526 ▼1823.78 ▲5.53671.56 ▲62.7053.39 ▼17.62
Media Library /wp-admin/upload.php1,400 ▲34.12 ▼0.0695.78 ▼4.9644.12 ▼0.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

trigger-browsersync/trigger-browsersync.php 92% from 13 tests

The main file in "Trigger Browsersync" v. 0.8.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin226 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11667226

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.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 are no PNG files in this plugin