84% inject-header-and-footer

Code Review | Inject Header And Footer

WordPress plugin Inject Header And Footer scored84%from 54 tests.

About plugin

  • Plugin page: inject-header-and...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 2, 2017
  • Latest release: Jun 2, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: digitaladquest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,897 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Inject Header And Footer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0243.56 ▼2.15
Dashboard /wp-admin4.32 ▲0.6958.18 ▼3.44
Posts /wp-admin/edit.php3.70 ▲0.0248.94 ▼8.87
Add New Post /wp-admin/post-new.php6.17 ▲0.0288.61 ▼7.96
Media Library /wp-admin/upload.php3.51 ▲0.0240.99 ▲2.31

Server storage [IO: ▲0.02MB] [DB: ▲0.14MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Inject Header And Footer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲14514.67 ▼0.131.80 ▲0.1541.69 ▼5.01
Dashboard /wp-admin2,274 ▲945.60 ▼0.0586.04 ▼4.0473.57 ▲29.79
Posts /wp-admin/edit.php2,116 ▲162.01 ▲0.0241.12 ▼3.4244.53 ▲7.86
Add New Post /wp-admin/post-new.php1,562 ▲3123.17 ▲0.02675.39 ▲44.3949.66 ▼4.03
Media Library /wp-admin/upload.php1,419 ▲164.13 ▼0.05114.84 ▲12.5649.20 ▲6.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inject-header-and-footer/inject-header-and-footer.php:27

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: add codes head section, insert scripts to header, insert scripts to footer, add insert scripts codes, add codes footer section

inject-header-and-footer/inject-header-and-footer.php 92% from 13 tests

The principal PHP file in "Inject Header And Footer" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin134 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14535105
CSS10129

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png5.21KB1.48KB▼ 71.70%
images/feed-logo.png5.06KB2.17KB▼ 57.04%