83% browser-update-ribbon

Code Review | Browser Update Ribbon

WordPress plugin Browser Update Ribbon scored83%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: 6.3.1
  • 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

60+ active /6,907 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Browser Update Ribbon
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4740.89 ▼0.36
Dashboard /wp-admin3.31 ▲0.0144.91 ▼4.75
Posts /wp-admin/edit.php3.36 ▲0.0141.03 ▼0.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0177.76 ▼13.48
Media Library /wp-admin/upload.php3.24 ▲0.0132.95 ▼0.03
Update Ribbon /wp-admin/options-general.php?page=browser_update_ribbon_options3.2440.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Browser Update Ribbon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.19 ▼0.081.70 ▲0.0242.03 ▼4.31
Dashboard /wp-admin2,199 ▲225.60 ▲0.0287.86 ▼14.0342.10 ▼2.65
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0133.78 ▼1.6233.92 ▼2.29
Add New Post /wp-admin/post-new.php1,529 ▲323.54 ▲0.34677.48 ▼11.9766.03 ▲16.19
Media Library /wp-admin/upload.php1,404 ▲104.18 ▼0.0093.60 ▼3.9042.46 ▼4.06
Update Ribbon /wp-admin/options-general.php?page=browser_update_ribbon_options1,2743.0139.9653.60

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 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 just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add a description for screenshot #3 in browser-update-ribbon/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 25 tag instead of maximum 10
You can look at the official readme.txt

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

This is the main PHP file of "Browser Update Ribbon" version 1.4.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file 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 review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,284 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP41513511,133
PO File14042110
JavaScript16041

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods2132.31%
▷ Protected methods4467.69%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants58
▷ 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%