84% browser-theme-color

Code Review | Browser Theme Color

WordPress plugin Browser Theme Color scored84%from 54 tests.

About plugin

  • Plugin page: browser-theme-color
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Feb 17, 2023
  • Number of updates: 17
  • Update frequency: every 143.8 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /21,626 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.09ms] Passed 4 tests

A check of server-side resources used by Browser Theme Color
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.94 ▼4.98
Dashboard /wp-admin3.31 ▼0.0345.47 ▼14.54
Posts /wp-admin/edit.php3.36 ▲0.0147.39 ▲4.48
Add New Post /wp-admin/post-new.php5.91 ▲0.03102.66 ▲6.16
Media Library /wp-admin/upload.php3.24 ▲0.0136.89 ▼1.32
Browser Color /wp-admin/options-general.php?page=btc_settings3.2030.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Browser Theme Color
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲3114.40 ▲0.141.71 ▼0.1543.44 ▼0.74
Dashboard /wp-admin2,218 ▲445.95 ▲0.3888.70 ▼5.5538.59 ▼3.60
Posts /wp-admin/edit.php2,125 ▲462.31 ▲0.2836.94 ▲2.2230.20 ▼6.46
Add New Post /wp-admin/post-new.php1,552 ▲1618.36 ▼4.69625.81 ▲18.7746.76 ▼39.20
Media Library /wp-admin/upload.php1,426 ▲294.45 ▲0.29101.24 ▼9.7740.63 ▼5.39
Browser Color /wp-admin/options-general.php?page=btc_settings9222.3339.9324.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/browser-theme-color/browser-theme-color.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: android, windows phone, browser, phone, theme...

browser-theme-color/browser-theme-color.php Passed 13 tests

"Browser Theme Color" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
Simple and effective plugin to add the "theme-color" meta tag to your website

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
Everything looks great! No dangerous files found in this plugin38 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP151035
JavaScript1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.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
There are no PNG files in this plugin