93% rainbow-address-bar

Code Review | Rainbow Address Bar

WordPress plugin Rainbow Address Bar scored 93% from 54 tests.

About plugin

  • Plugin page: rainbow-address-bar
  • Plugin version: 1.0.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.5
  • WordPress version: 5.8.1
  • First release: Dec 12, 2019
  • Latest release: Oct 7, 2020
  • Number of updates: 8
  • Update frequency: every 37.5 days
  • Top authors: dhruvpandya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 1,591 total downloads

Benchmarks

Plugin footprint Passed 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.07MB] [CPU: ▼146.64ms] Passed 4 tests

This is a short check of server-side resources used by Rainbow Address Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0638.53 ▲4.65
Dashboard /wp-admin3.14 ▲0.0846.21 ▼3.23
Posts /wp-admin/edit.php3.23 ▲0.1249.42 ▲0.68
Add New Post /wp-admin/post-new.php5.50 ▲0.0691.69 ▼588.64
Media Library /wp-admin/upload.php3.08 ▲0.0834.03 ▲6.84
Rainbow Address Bar /wp-admin/themes.php?page=rainbow-address-bar3.0526.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options
rab-switch
rab-amp-switch

Browser metrics Passed 4 tests

An overview of browser requirements for Rainbow Address Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,730 ▲13416.07 ▲0.0913.32 ▲3.5752.86 ▲7.51
Dashboard /wp-admin2,997 ▲636.63 ▲0.73131.23 ▼19.53108.38 ▲1.03
Posts /wp-admin/edit.php2,763 ▲243.14 ▲0.4369.45 ▼8.3597.76 ▲2.10
Add New Post /wp-admin/post-new.php1,645 ▼3822.10 ▲3.72292.88 ▼145.36102.02 ▼5.97
Media Library /wp-admin/upload.php1,835 ▲285.38 ▲0.34130.62 ▼41.09117.29 ▼1.01
Rainbow Address Bar /wp-admin/themes.php?page=rainbow-address-bar1,8773.3499.0670.89

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rainbow-address-bar/class-rainbow-address-bar.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt might help

rainbow-address-bar/class-rainbow-address-bar.php 77% from 13 tests

This is the main PHP file of "Rainbow Address Bar" version 1.0.4.1, 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:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rainbow-address-bar.php" instead of "class-rainbow-address-bar.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected423 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP245155231
CSS1210118
Markdown123058
JavaScript13216

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin