78% header-footer-code

Code Review | NinjaTeam Header Footer Custom Code

WordPress plugin NinjaTeam Header Footer Custom Code scored78%from 54 tests.

About plugin

  • Plugin page: header-footer-code
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Sep 8, 2023
  • Number of updates: 14
  • Update frequency: every 142.1 days
  • Top authors: ninjateam (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,355 total downloads


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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.05ms] Passed 4 tests

Analyzing server-side resources used by NinjaTeam Header Footer Custom Code
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.42 ▲3.01
Dashboard /wp-admin3.36 ▲0.0648.86 ▲1.63
Posts /wp-admin/edit.php3.48 ▲0.1251.27 ▲0.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.99 ▼5.44
Media Library /wp-admin/upload.php3.26 ▲0.0336.77 ▲3.94
Header Footer Code /wp-admin/options-general.php?page=njt-header-footer3.2638.89

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for NinjaTeam Header Footer Custom Code
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲18915.06 ▲0.691.79 ▼0.0741.86 ▲5.54
Dashboard /wp-admin2,365 ▲1826.86 ▲1.95124.79 ▲1.7036.88 ▼10.75
Posts /wp-admin/edit.php2,274 ▲1853.82 ▲1.7853.94 ▲15.8835.96 ▲1.01
Add New Post /wp-admin/post-new.php1,537 ▲1823.72 ▲0.42600.33 ▼111.6834.86 ▼29.16
Media Library /wp-admin/upload.php1,410 ▲224.58 ▲0.3783.17 ▼23.7941.20 ▼5.84
Header Footer Code /wp-admin/options-general.php?page=njt-header-footer1,2903.8555.1136.52

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

Smoke tests 50% 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 0% 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 output text when accessed directly:
    • > /wp-content/plugins/header-footer-code/index.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/header-footer-code/njt-header-footer-injection.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/header-footer-code/view/setting.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 90% 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
6 plugin tags: custom code, footer, google analytics, header, custom css...

header-footer-code/njt-header-footer-injection.php 77% from 13 tests

The main PHP script in "NinjaTeam Header Footer Custom Code" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("header-footer-code.php" instead of "njt-header-footer-injection.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin10,236 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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
PNG images were not found in this plugin