72% browsers-need-to-be-updated

Code Review | Browsers Need to be Updated

WordPress plugin Browsers Need to be Updated scored 72% from 54 tests.

About plugin

  • Plugin page: browsers-need-to-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: May 6, 2015
  • Latest release: May 7, 2015
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: ShervinQQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.10MB] [CPU: ▼9.68ms] Passed 4 tests

Server-side resources used by Browsers Need to be Updated
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▼0.5820.16 ▼21.25
Dashboard /wp-admin3.36 ▲0.0648.60 ▼1.26
Posts /wp-admin/edit.php3.47 ▲0.1246.32 ▼2.92
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.37 ▼13.28
Media Library /wp-admin/upload.php3.28 ▲0.0536.42 ▲3.83
Browsers Need to be Updated /wp-admin/plugins.php?page=BNU3.2328.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
BNU_options

Browser metrics Passed 4 tests

Checking browser requirements for Browsers Need to be Updated
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.221.77 ▼0.1243.78 ▼2.44
Dashboard /wp-admin2,210 ▲195.90 ▲0.98109.20 ▲4.8041.78 ▼1.41
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0234.59 ▼0.7036.03 ▲4.88
Add New Post /wp-admin/post-new.php1,537 ▲2323.34 ▲5.71672.86 ▼12.7447.16 ▼6.11
Media Library /wp-admin/upload.php1,392 ▲44.28 ▲0.0894.46 ▼18.2542.31 ▼6.50
Browsers Need to be Updated /wp-admin/plugins.php?page=BNU7061.146.6621.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • recovery_mode_email_last_sent
    • BNU_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/plugins.php?page=BNU
    • > 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/plugins.php?page=BNU
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/plugins.php?page=BNU
    • > Deprecated in wp-content/plugins/browsers-need-to-be-updated/classes/sf-class-settings.php+453
    Non-static method SF_Format_Options::settings_options_format() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=BNU
    • > Error in wp-content/plugins/browsers-need-to-be-updated/classes/sf-class-format-options.php+27
    Uncaught Error: Using $this when not in object context in wp-content/plugins/browsers-need-to-be-updated/classes/sf-class-format-options.php:27
    Stack trace:
    #0 wp-content/plugins/browsers-need-to-be-updated/classes/sf-class-settings.php(453): SF_Format_Options::settings_options_format()
    #1 wp-content/plugins/browsers-need-to-be-updated/classes/sf-class-settings.php(486): SF_Settings_API->template_body()
    #2 wp-includes/class-wp-hook.php(310): SF_Settings_API->init_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/plugins.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'SF_Settings_API' not found in wp-content/plugins/browsers-need-to-be-updated/classes/sf-class-format-options.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/browsers-need-to-be-updated/options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/browsers-need-to-be-updated/update_browser.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/browsers-need-to-be-updated/BNU.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/plugins.php?page=BNU
    • > Network (severe)
    wp-content/plugins/var/www/wordpress/wp-content/plugins/browsers-need-to-be-updated/classes/js/bootstrap-tooltip.js?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=BNU
    • > Network (severe)
    wp-content/plugins/var/www/wordpress/wp-content/plugins/browsers-need-to-be-updated/classes/js/select2/select2.min.js?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=BNU
    • > Network (severe)
    wp-content/plugins/var/www/wordpress/wp-content/plugins/browsers-need-to-be-updated/classes/js/sf-jquery.js?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

browsers-need-to-be-updated/BNU.php 92% from 13 tests

This is the main PHP file of "Browsers Need to be Updated" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("browsers-need-to-be-updated.php" instead of "BNU.php")

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
Success! There were no dangerous files found in this plugin4,391 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP84106901,847
JavaScript43943301,741
CSS5145202803

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity67.60
▷ Minimum class complexity13.00
▷ Maximum class complexity203.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods103
▷ Static methods00.00%
▷ Public methods4341.75%
▷ Protected methods4644.66%
▷ Private methods1413.59%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants55
▷ Global constants11.82%
▷ Class constants5498.18%
▷ Public constants54100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/google_chrome.png9.61KB3.41KB▼ 64.50%
assets/images/opera.png2.81KB2.60KB▼ 7.41%
assets/images/apple_safari.png16.71KB5.14KB▼ 69.23%
assets/images/microsoft_internet_explorer.png20.24KB6.47KB▼ 68.02%
assets/images/mozilla_firefox.png26.83KB8.71KB▼ 67.54%