84% simple-header-footer-html

Code Review | Simple Header Footer HTML

WordPress plugin Simple Header Footer HTML scored84%from 54 tests.

About plugin

  • Plugin page: simple-header-foo...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.9-5.5
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Aug 6, 2020
  • Number of updates: 25
  • Update frequency: every 94.2 days
  • Top authors: Zuige (68%)seravo (16%)deployer (12%)ottok (12%)onnimonni (8%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /27,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.64ms] Passed 4 tests

Server-side resources used by Simple Header Footer HTML
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.46 ▼3.51
Dashboard /wp-admin3.33 ▲0.0248.94 ▼5.86
Posts /wp-admin/edit.php3.38 ▲0.0252.54 ▲2.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.71 ▼29.67
Media Library /wp-admin/upload.php3.25 ▲0.0236.62 ▲0.48
Header Footer HTML /wp-admin/options-general.php?page=simple-header-footer-html/simple-header-footer-html.php3.2236.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Header Footer HTML: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.101.76 ▲0.0342.85 ▼1.36
Dashboard /wp-admin2,196 ▲195.60 ▼0.0085.08 ▼17.0742.42 ▼2.32
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0236.32 ▼2.7435.17 ▲2.19
Add New Post /wp-admin/post-new.php1,529 ▲323.79 ▲0.28660.69 ▼43.9859.45 ▼1.44
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.0594.92 ▼16.1641.55 ▼3.20
Header Footer HTML /wp-admin/options-general.php?page=simple-header-footer-html/simple-header-footer-html.php8452.0324.6230.90

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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-header-footer-html/simple-header-footer-html.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: footer, header, https, seravo, js...

simple-header-footer-html/simple-header-footer-html.php 92% from 13 tests

The entry point to "Simple Header Footer HTML" version 1.3.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected209 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File2161679
PHP1294065
JSON10022
Markdown112022
YAML19321

PHP code Passed 2 tests

Analyzing 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.00
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected