84% bg-highlight-names

Code Review | Bg Highlight Names

WordPress plugin Bg Highlight Names scored 84% from 54 tests.

About plugin

  • Plugin page: bg-highlight-names
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: Dec 24, 2021
  • Number of updates: 21
  • Update frequency: every 102.7 days
  • Top authors: VBog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▲46.01ms] Passed 4 tests

A check of server-side resources used by Bg Highlight Names
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.77 ▲2.31228.80 ▲184.51
Dashboard /wp-admin3.47 ▲0.1647.39 ▼5.39
Posts /wp-admin/edit.php3.58 ▲0.2252.72 ▼3.44
Add New Post /wp-admin/post-new.php6.71 ▲0.82334.99 ▲241.09
Media Library /wp-admin/upload.php3.39 ▲0.1639.16 ▲8.36
Highlight names /wp-admin/options-general.php?page=bg-highlight-names/bg-hlnames.php3.3632.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 21 new options
New WordPress options
bg_hlnames_mode
bg_hlnames_start_old
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
bg_hlnames_not_clean
bg_hlnames_datebase
bg_hlnames_debug
bg_hlnames_in_progress
bg_hlnames_classname
...

Browser metrics Passed 4 tests

A check of browser resources used by Bg Highlight Names
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲5913.22 ▼1.161.54 ▼0.4237.71 ▼12.07
Dashboard /wp-admin2,210 ▲225.85 ▲0.01106.83 ▼11.1841.04 ▼3.87
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0342.20 ▲1.6735.92 ▼1.98
Add New Post /wp-admin/post-new.php1,517 ▼2517.59 ▼0.93668.88 ▲19.9757.77 ▼8.23
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.2098.59 ▼6.3944.61 ▲2.55
Highlight names /wp-admin/options-general.php?page=bg-highlight-names/bg-hlnames.php9392.1924.9529.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 21 options in the database
    • bg_hlnames_not_clean
    • bg_hlnames_in_progress
    • db_upgraded
    • bg_hlnames_maxtime
    • bg_hlnames_version
    • widget_recent-comments
    • bg_hlnames_target
    • bg_hlnames_classname
    • widget_theysaidso_widget
    • bg_hlnames_start_old
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bg-highlight-names/bg-hlnames.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: The plugin tags were not defined
You can look at the official readme.txt

bg-highlight-names/bg-hlnames.php 92% from 13 tests

The main file in "Bg Highlight Names" v. 1.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bg-highlight-names.php" instead of "bg-hlnames.php")

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 plugin10,361 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
XML2059,387
PHP2116106745
PO File1107145229

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods350.00%
▷ Protected methods00.00%
▷ Private methods350.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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