84% visual-header

Code Review | Visual Header

WordPress plugin Visual Header scored84%from 54 tests.

About plugin

  • Plugin page: visual-header
  • Plugin version: 1.2
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 20, 2023
  • Latest release: Nov 2, 2023
  • Number of updates: 31
  • Update frequency: every 2.7 days
  • Top authors: dastan800 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /187 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.14MB] [CPU: ▼4.58ms] Passed 4 tests

Analyzing server-side resources used by Visual Header
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.88 ▼0.53
Dashboard /wp-admin3.47 ▲0.1251.94 ▼10.59
Posts /wp-admin/edit.php3.58 ▲0.2244.04 ▼2.24
Add New Post /wp-admin/post-new.php6.07 ▲0.1891.87 ▼4.97
Media Library /wp-admin/upload.php3.39 ▲0.1634.69 ▲0.87

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Visual Header
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.23 ▼0.051.88 ▲0.1342.88 ▼1.10
Dashboard /wp-admin2,207 ▲295.66 ▼0.0090.30 ▼10.6541.00 ▼1.06
Posts /wp-admin/edit.php2,109 ▲92.04 ▲0.0535.76 ▲0.1234.82 ▼2.11
Add New Post /wp-admin/post-new.php1,545 ▲1918.41 ▼4.62608.98 ▼58.9159.00 ▲9.45
Media Library /wp-admin/upload.php1,409 ▲94.25 ▲0.0195.44 ▲0.1839.24 ▼3.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/visual-header/single-visualheader.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/framework/metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/framework/library.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/framework/perview.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/framework/customize.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/visual-header/framework/duplicate.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/visual-header.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/framework/builder.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-header/framework/default.php:8

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 Passed 29 tests

readme.txt Passed 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
2 plugin tags: header builder, header

visual-header/visual-header.php Passed 13 tests

Analyzing the main PHP file in "Visual Header" version 1.2
100 characters long description:
You To Live Build Any Header Layout You Exactly Need. Intuitive And Easy To Use Drag & Drop Builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin4,728 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
CSS882132,042
JavaScript65263951,920
PHP12194164612
PO File15458134
SVG10020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 PNG files occupy 0.30MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/icon/header_import.png15.74KB0.47KB▼ 97.03%
assets/image/icon/close.png15.23KB0.63KB▼ 95.89%
assets/image/icon/is_default.png14.66KB0.68KB▼ 95.34%
assets/image/icon/back.png14.99KB0.63KB▼ 95.78%
assets/image/icon/duplicate.png15.13KB0.46KB▼ 96.97%