89% ucf-header-bar

Code Review | UCF Header Bar

WordPress plugin UCF Header Bar scored 89% from 54 tests.

About plugin

  • Plugin page: ucf-header-bar
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 29, 2016
  • Latest release: Feb 21, 2018
  • Number of updates: 17
  • Update frequency: every 42.7 days
  • Top authors: jhendricker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by UCF Header Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.71 ▼9.91
Dashboard /wp-admin3.32 ▲0.0248.65 ▲1.74
Posts /wp-admin/edit.php3.37 ▲0.0147.30 ▼4.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.95 ▼11.17
Media Library /wp-admin/upload.php3.24 ▲0.0134.17 ▼0.84
UCF Header Bar /wp-admin/options-general.php?page=ucf-header-bar3.2130.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for UCF Header Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20115.02 ▲0.6441.31 ▲39.4146.94 ▼2.34
Dashboard /wp-admin2,213 ▲284.86 ▼0.0698.61 ▼10.3139.41 ▼1.75
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0242.22 ▲1.8736.95 ▲2.52
Add New Post /wp-admin/post-new.php1,536 ▼623.36 ▲5.21670.59 ▲74.4851.84 ▼2.15
Media Library /wp-admin/upload.php1,392 ▲44.15 ▼0.0593.98 ▼6.3841.02 ▲0.47
UCF Header Bar /wp-admin/options-general.php?page=ucf-header-bar7792.0627.9828.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.jpg), #2 (screenshot-2.png)
You can look at the official readme.txt

ucf-header-bar/ucf-header.php 92% from 13 tests

This is the main PHP file of "UCF Header Bar" version 1.04, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ucf-header-bar.php" instead of "ucf-header.php")

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
Good job! No executable or dangerous file extensions detected95 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212695

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png15.26KB5.75KB▼ 62.32%