90% browser-check

Code Review | Browser Check

WordPress plugin Browser Check scored90%from 54 tests.

About plugin

  • Plugin page: browser-check
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2016
  • Latest release: Mar 12, 2016
  • Number of updates: 14
  • Update frequency: every 3.5 days
  • Top authors: Yarick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,242 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.32ms] Passed 4 tests

This is a short check of server-side resources used by Browser Check
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.80 ▼0.27
Dashboard /wp-admin3.37 ▲0.0756.14 ▲2.03
Posts /wp-admin/edit.php3.48 ▲0.1349.57 ▲0.37
Add New Post /wp-admin/post-new.php5.95 ▲0.06109.31 ▲6.62
Media Library /wp-admin/upload.php3.29 ▲0.0632.00 ▼7.40
Browser check /wp-admin/options-general.php?page=browser-check-settings3.2633.92

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
browser_check
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Browser Check
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.23 ▼0.381.96 ▲0.1243.84 ▼12.91
Dashboard /wp-admin2,199 ▲225.65 ▼0.0295.02 ▼1.3542.08 ▼1.24
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0635.43 ▼2.2534.82 ▼0.37
Add New Post /wp-admin/post-new.php1,529 ▲123.38 ▲0.28687.32 ▼42.5852.74 ▼14.27
Media Library /wp-admin/upload.php1,401 ▲14.19 ▲0.08101.84 ▼5.6144.86 ▼1.99
Browser check /wp-admin/options-general.php?page=browser-check-settings9721.6623.6329.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • browser_check
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: flash, check, block, browser, old...

browser-check/browser-check.php Passed 13 tests

This is the main PHP file of "Browser Check" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
62 characters long description:
Check browser version, JavaScript, Cookie, Adobe Flash Player.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,065 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP119211558
JavaScript63112268
PO File15073160
CSS40079

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.67
▷ Minimum class complexity5.00
▷ Maximum class complexity31.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods3890.48%
▷ Protected methods00.00%
▷ Private methods49.52%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected