83% wp-display-header

Code Review | WP Display Header

WordPress plugin WP Display Header scored83%from 54 tests.

About plugin

  • Plugin page: wp-display-header
  • Plugin version: 7...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2011
  • Latest release: Nov 20, 2022
  • Number of updates: 50
  • Update frequency: every 85.1 days
  • Top authors: kobenland (74%)obenland (28%)

Code review

54 tests

User reviews

27 reviews

Install metrics

10,000+ active /227,932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by WP Display Header
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.68 ▲0.35
Dashboard /wp-admin3.31 ▲0.0051.52 ▲0.59
Posts /wp-admin/edit.php3.36 ▲0.0052.84 ▲2.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.92 ▼12.74
Media Library /wp-admin/upload.php3.23 ▲0.0036.58 ▲3.24

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Display Header
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.69 ▲0.682.16 ▲0.3940.69 ▼4.92
Dashboard /wp-admin2,192 ▲155.60 ▲0.0693.44 ▲5.5243.38 ▼0.36
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0144.70 ▲7.3537.76 ▲0.11
Add New Post /wp-admin/post-new.php1,525 ▼323.08 ▼0.03637.49 ▼21.3250.13 ▼8.32
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.0299.02 ▼0.3145.93 ▼5.10

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Obenland_Wp_Plugins_V5' not found in wp-content/plugins/wp-display-header/class-obenland-wp-display-header.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-display-header/uninstall.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-display-header/wp-display-header.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-display-header/wp-display-header.php 85% from 13 tests

"WP Display Header" version 7...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "7...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected585 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4104420453
PO File23374102
CSS27030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity36.50
▷ Minimum class complexity8.00
▷ Maximum class complexity65.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods2167.74%
▷ Protected methods929.03%
▷ Private methods13.23%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin