93% browser-update-ribbon

Code Review | Browser Update Ribbon

WordPress plugin Browser Update Ribbon scored 93% from 54 tests.

About plugin

  • Plugin page: browser-update-ri...
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 5.9.2
  • First release: Mar 12, 2012
  • Latest release: Jan 18, 2016
  • Number of updates: 24
  • Update frequency: every 58.6 days
  • Top authors: duckinformatica (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 6,430 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼296.54ms] Passed 4 tests

A check of server-side resources used by Browser Update Ribbon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.4962.02 ▲3.32
Dashboard /wp-admin3.48 ▲0.0737.97 ▼0.79
Posts /wp-admin/edit.php3.70 ▲0.0643.24 ▲2.34
Add New Post /wp-admin/post-new.php6.94 ▼0.0399.55 ▼1,185.67
Media Library /wp-admin/upload.php3.36 ▲0.0623.28 ▼2.02
Update Ribbon /wp-admin/options-general.php?page=browser_update_ribbon_options3.3628.97

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Browser Update Ribbon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.88 ▲0.176.63 ▲0.802.43 ▼0.21
Dashboard /wp-admin2,893 ▲326.14 ▼0.07114.10 ▼24.25154.76 ▼6.09
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0164.44 ▼4.80142.37 ▼6.89
Add New Post /wp-admin/post-new.php1,766 ▲5519.06 ▼2.23388.65 ▼57.87151.55 ▼6.54
Media Library /wp-admin/upload.php1,703 ▲85.48 ▼0.05157.18 ▲22.79191.43 ▼3.14
Update Ribbon /wp-admin/options-general.php?page=browser_update_ribbon_options1,6924.2768.43145.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/browser-update-ribbon/browser_update_ribbon.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #3 in browser-update-ribbon/assets to your readme.txt
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt is a good inspiration

browser-update-ribbon/browser_update_ribbon.php 85% from 13 tests

Analyzing the main PHP file in "Browser Update Ribbon" version 1.4.3
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("browser-update-ribbon.php" instead of "browser_update_ribbon.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 plugin1,284 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File14042110

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity141.00
▷ Minimum class complexity141.00
▷ Maximum class complexity141.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2132.31%
▷ Protected methods4467.69%
▷ Private methods00.00%
▷ Named functions9100.00%
▷ Anonymous functions00.00%
▷ Global constants11.72%
▷ Class constants5798.28%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
default_ribbon_top.png11.72KB5.69KB▼ 51.43%
default_ribbon_bottom.png12.23KB5.86KB▼ 52.09%