10% simple-header-footer-scripts

Code Review | Simple Header Footer Scripts

WordPress plugin Simple Header Footer Scripts scored10%from 54 tests.

About plugin

  • Plugin page: simple-header-foo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Jun 4, 2018
  • Latest release: Jun 4, 2018
  • Number of updates: 2
  • Update frequency: every 56.5 days
  • Top authors: mandava (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /570 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/simple-header-footer-scripts/simple-header-footer-scripts.php+46
    Use of undefined constant shf_uninstall_plugin - assumed 'shf_uninstall_plugin' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼54.64ms] Passed 4 tests

An overview of server-side resources used by Simple Header Footer Scripts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.06 ▼36.90
Dashboard /wp-admin2.07 ▼1.235.68 ▼43.92
Posts /wp-admin/edit.php2.08 ▼1.285.81 ▼45.87
Add New Post /wp-admin/post-new.php2.07 ▼3.825.82 ▼91.86
Media Library /wp-admin/upload.php2.07 ▼1.165.87 ▼29.74
Simple Header Footer Scripts /wp-admin/options-general.php?page=simple-header-footer-scripts2.085.16

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Header Footer Scripts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6913.22 ▼1.161.61 ▼0.4640.10 ▼4.24
Dashboard /wp-admin2,232 ▲444.88 ▼0.06104.11 ▼8.6142.28 ▼4.96
Posts /wp-admin/edit.php2,115 ▲262.04 ▲0.0241.28 ▲0.8337.78 ▲2.75
Add New Post /wp-admin/post-new.php1,551 ▲1823.45 ▲0.34658.57 ▼56.2556.35 ▼0.68
Media Library /wp-admin/upload.php1,414 ▲264.28 ▲0.07101.07 ▼8.0742.59 ▼0.72
Simple Header Footer Scripts /wp-admin/options-general.php?page=simple-header-footer-scripts1,1553.8084.8242.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/simple-header-footer-scripts/simple-header-footer-scripts.php+46
    Use of undefined constant shf_uninstall_plugin - assumed 'shf_uninstall_plugin' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=simple-header-footer-scripts
    • > Warning in wp-content/plugins/simple-header-footer-scripts/simple-header-footer-scripts.php+46
    Use of undefined constant shf_uninstall_plugin - assumed 'shf_uninstall_plugin' (this will throw an Error in a future version of PHP)

SRP 50% 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 take a closer look at the following
  • 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/simple-header-footer-scripts/admin/class-shf-settings.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-header-footer-scripts/admin/class-shf-admin.php:88

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #1 (Admin view of Simple Header Footer Scripts plugin.)
The official readme.txt might help

simple-header-footer-scripts/simple-header-footer-scripts.php Passed 13 tests

The main file in "Simple Header Footer Scripts" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Insert header footer scripts in your WordPress website easily.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected547 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP3152278393
CSS213181
JavaScript428570
Markdown1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.00
▷ Minimum class complexity17.00
▷ Maximum class complexity49.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
No PNG images were found in this plugin