78% browser-compatibility-warning

Code Review | WP Browser Compatibility Checker

WordPress plugin WP Browser Compatibility Checker scored78%from 54 tests.

About plugin

  • Plugin page: browser-compatibi...
  • Plugin version: 1.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2013
  • Latest release: Sep 23, 2013
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: impression11 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,255 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.28ms] Passed 4 tests

Analyzing server-side resources used by WP Browser Compatibility Checker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0524.19 ▼16.31
Dashboard /wp-admin3.34 ▼0.0043.06 ▼15.97
Posts /wp-admin/edit.php3.39 ▲0.0447.69 ▼2.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.94 ▼3.69
Media Library /wp-admin/upload.php3.26 ▲0.0433.90 ▼5.16
Browser Warning /wp-admin/themes.php?page=browser_warning3.2030.68

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Browser Compatibility Checker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.63 ▼0.609.04 ▲7.2338.51 ▼4.79
Dashboard /wp-admin2,210 ▲225.86 ▼0.05105.70 ▲2.5545.66 ▲3.56
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0341.91 ▲0.5936.25 ▲1.92
Add New Post /wp-admin/post-new.php1,536 ▲823.25 ▲0.02753.04 ▲79.1058.88 ▲3.21
Media Library /wp-admin/upload.php1,386 ▼54.21 ▲0.08103.71 ▼2.9346.16 ▼0.83
Browser Warning /wp-admin/themes.php?page=browser_warning8712.0325.3229.17

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=browser_warning
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=browser_warning
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=browser_warning
    • > Notice in wp-content/plugins/browser-compatibility-warning/include/options.php+57
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/browser-compatibility-warning/include/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/browser-compatibility-warning/include/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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
3 plugin tags: compatibility, browser, checker

browser-compatibility-warning/index.php 85% from 13 tests

The primary PHP file in "WP Browser Compatibility Checker" version 1.05 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 175 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("browser-compatibility-warning.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin379 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32930185
PHP229158
CSS10036

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/warning.png4.32KB1.79KB▼ 58.48%