78% external-header-footer

Code Review | External Header Footer

WordPress plugin External Header Footer scored78%from 54 tests.

About plugin

  • Plugin page: external-header-f...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-5.0.0
  • WordPress version: 6.3.1
  • First release: Jan 2, 2015
  • Latest release: Dec 10, 2018
  • Number of updates: 5
  • Update frequency: every 287.6 days
  • Top authors: yllus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,450 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.13ms] Passed 4 tests

A check of server-side resources used by External Header Footer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.65 ▼0.96
Dashboard /wp-admin3.37 ▲0.0651.00 ▼4.18
Posts /wp-admin/edit.php3.42 ▲0.0649.38 ▲1.69
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.33 ▼1.07
Media Library /wp-admin/upload.php3.29 ▲0.0637.28 ▲3.04
External Header Footer /wp-admin/options-general.php?page=external_header_footer_settings3.2541.85

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for External Header Footer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.10 ▼0.501.91 ▼0.2845.87 ▲3.12
Dashboard /wp-admin2,199 ▲255.58 ▼0.0293.39 ▼3.2343.12 ▼1.27
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0437.35 ▲1.1239.53 ▲3.33
Add New Post /wp-admin/post-new.php1,544 ▲1823.03 ▼0.06662.36 ▲4.7167.81 ▲9.00
Media Library /wp-admin/upload.php1,395 ▼54.19 ▼0.0595.39 ▼13.4244.32 ▼4.49
External Header Footer /wp-admin/options-general.php?page=external_header_footer_settings1,0932.1525.1733.68

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/external-header-footer/test-page.php
  • 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/external-header-footer/external-header-footer.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Screenshots: Please add images for these screenshots: #1 (The settings page for External Header Footer allows you to enable/disable whether or not your WordPress website's header and footer will be available for external consumption (**Expose Header and Footer**). If that option is checked, the **Header URL** and **Footer URL** fields display the URLs that should be retrieved by external websites when using your site's header and footer.), #2 (This displays what's found at the **Demo Page URL**; namely, some placeholder text wrapped by your site's header and footer.)
  • Tags: No valid plugin tags found
The official readme.txt is a good inspiration

external-header-footer/external-header-footer.php 92% from 13 tests

"External Header Footer" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 159 characters long)

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
No dangerous file extensions were detected359 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP268114359

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.15
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%
Functions20
▷ Named functions20100.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
2 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-2.png41.05KB20.38KB▼ 50.34%
images/screenshot-1.png127.42KB57.25KB▼ 55.07%