78% flaming-browser-support

Code Review | Flaming Browser Support

WordPress plugin Flaming Browser Support scored78%from 54 tests.

About plugin

  • Plugin page: flaming-browser-s...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2015
  • Latest release: Aug 24, 2018
  • Number of updates: 10
  • Update frequency: every 103.8 days
  • Top authors: jcaruso001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼11.69ms] Passed 4 tests

This is a short check of server-side resources used by Flaming Browser Support
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.3146.70 ▲1.30
Dashboard /wp-admin3.92 ▲0.2953.53 ▼14.56
Posts /wp-admin/edit.php3.96 ▲0.2848.34 ▼5.48
Add New Post /wp-admin/post-new.php6.55 ▲0.4078.53 ▼26.97
Media Library /wp-admin/upload.php3.80 ▲0.3139.38 ▲0.24

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Flaming Browser Support
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.75 ▲0.372.10 ▲0.1440.90 ▼3.94
Dashboard /wp-admin2,211 ▲315.66 ▼0.0582.84 ▼9.4138.63 ▼2.61
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0236.34 ▼6.2933.04 ▼4.90
Add New Post /wp-admin/post-new.php1,539 ▲817.39 ▼5.88692.63 ▼8.7654.92 ▼11.16
Media Library /wp-admin/upload.php1,416 ▲224.17 ▼0.06104.15 ▼4.3244.77 ▼1.24

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

Smoke tests 50% from 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 0% 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 take a closer look at the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/flaming-browser-support/views/messages.php
    • > /wp-content/plugins/flaming-browser-support/views/unsupported.php
    • > /wp-content/plugins/flaming-browser-support/views/defaults/unsupported_mobile.php
    • > /wp-content/plugins/flaming-browser-support/views/defaults/unsupported_tablet.php
    • > /wp-content/plugins/flaming-browser-support/views/defaults/unsupported_browser.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant FLAMING_BROWSER_SUPPORT_VERSION - assumed 'FLAMING_BROWSER_SUPPORT_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/flaming-browser-support/views/settings.php on line 9
    • > PHP Notice
      Trying to get property 'CSS' of non-object in wp-content/plugins/flaming-browser-support/views/unsupported.php on line 19
    • > PHP Notice
      Undefined variable: Settings in wp-content/plugins/flaming-browser-support/views/settings.php on line 57
    • > PHP Notice
      Trying to get property 'BlockTablets' of non-object in wp-content/plugins/flaming-browser-support/views/settings.php on line 39
    • > PHP Notice
      Trying to get property 'BlockTabletsRedirect' of non-object in wp-content/plugins/flaming-browser-support/views/settings.php on line 40
    • > PHP Notice
      Trying to get property 'BlockUnsupportedBrowsers' of non-object in wp-content/plugins/flaming-browser-support/views/settings.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/flaming-browser-support/flaming-browser-support.php:23
    • > PHP Notice
      Trying to get property 'BlockMobileRedirect' of non-object in wp-content/plugins/flaming-browser-support/views/settings.php on line 31
    • > PHP Notice
      Undefined variable: Settings in wp-content/plugins/flaming-browser-support/views/settings.php on line 49
    • > PHP Notice
      Trying to get property 'BlockMobile' of non-object in wp-content/plugins/flaming-browser-support/views/settings.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === flaming-browser-support === )
Please take inspiration from this readme.txt

flaming-browser-support/flaming-browser-support.php Passed 13 tests

The entry point to "Flaming Browser Support" version 1.0.2 is a PHP file that has certain tags in its header comment area
105 characters long description:
Checks the users browser to see if it is supported, and displays a message if the browser is unsupported.

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
There were no executable files found in this plugin2,046 lines of code in 336 files:
LanguageFilesBlank linesComment linesLines of code
PHP111604301,469
JavaScript3232712425
CSS2280152

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity57.50
▷ Minimum class complexity3.00
▷ Maximum class complexity163.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods81
▷ Static methods67.41%
▷ Public methods3745.68%
▷ Protected methods4454.32%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants60
▷ Global constants46.67%
▷ Class constants5693.33%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/FlamingLogoReverse.png18.38KB5.16KB▼ 71.95%
resources/images/FlamingLogo.png17.23KB8.92KB▼ 48.22%