78% browser-theme-colors

Code Review | Browser Theme Colors

WordPress plugin Browser Theme Colors scored78%from 54 tests.

About plugin

  • Plugin page: browser-theme-colors
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8
  • WordPress version: 6.3.1
  • First release: Jun 25, 2017
  • Latest release: Jun 26, 2017
  • Number of updates: 2
  • Update frequency: every 65.5 days
  • Top authors: nuttifox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.96ms] Passed 4 tests

This is a short check of server-side resources used by Browser Theme Colors
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.43 ▼0.55
Dashboard /wp-admin3.37 ▲0.0646.55 ▼3.00
Posts /wp-admin/edit.php3.48 ▲0.1245.91 ▼2.32
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.90 ▼21.95
Media Library /wp-admin/upload.php3.29 ▲0.0638.08 ▲3.18
Browser Theme Color /wp-admin/admin.php?page=nuttifox-btc-options3.2632.72

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Browser Theme Colors: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17314.01 ▼0.358.02 ▲6.3138.78 ▼4.95
Dashboard /wp-admin2,232 ▲446.04 ▲0.15118.05 ▲6.4948.87 ▲8.48
Posts /wp-admin/edit.php2,124 ▲352.08 ▲0.1035.81 ▲1.6735.23 ▼2.53
Add New Post /wp-admin/post-new.php1,542 ▲1417.52 ▼5.74681.14 ▲8.5062.53 ▲6.82
Media Library /wp-admin/upload.php1,423 ▲414.19 ▲0.03102.60 ▼1.9648.93 ▲3.23
Browser Theme Color /wp-admin/admin.php?page=nuttifox-btc-options7742.0516.6818.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/browser-theme-colors/admin/partials/browser-theme-colors-admin-display.php
    • > /wp-content/plugins/browser-theme-colors/public/partials/browser-theme-colors-public-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=nuttifox-btc-options
    • > Rendering (warning) in unknown
    /wp-content/plugins/browser-theme-colors/admin/js/huebee.pkgd.min.js?ver=1.0.0 11 Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
    • > GET request to /wp-admin/admin.php?page=nuttifox-btc-options
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://nuttifox.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === browser-theme-colors === )
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The main PHP script in "Browser Theme Colors" version 1.0.0 is automatically included on every request by WordPress
97 characters long description:
Add the "theme-color" meta tag to your website. Compatible with (Android, iOS and Windows Phone).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin282 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12119518226
CSS351131
JavaScript353725

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 2.25MB with 1.54MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png76.84KB15.61KB▼ 79.69%
assets/banner-1544x500.png302.89KB111.13KB▼ 63.31%
assets/screenshot-2.png1,830.03KB731.53KB▼ 60.03%
assets/banner-772x250.png96.15KB28.01KB▼ 70.87%