84% scripts-to-footerphp

Code Review | Scripts To Footer

WordPress plugin Scripts To Footer scored 84% from 54 tests.

About plugin

  • Plugin page: scripts-to-footerphp
  • Plugin version: 0.7.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2013
  • Latest release: Feb 23, 2023
  • Number of updates: 59
  • Update frequency: every 62.4 days
  • Top authors: joshuadnelson (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

10,000+ active / 224,906 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.52ms] Passed 4 tests

Server-side resources used by Scripts To Footer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.96 ▼3.49
Dashboard /wp-admin3.45 ▲0.1549.05 ▲0.56
Posts /wp-admin/edit.php3.56 ▲0.2146.27 ▼2.96
Add New Post /wp-admin/post-new.php6.03 ▲0.1586.31 ▼7.66
Media Library /wp-admin/upload.php3.37 ▲0.1436.73 ▲0.05
Scripts to Footer /wp-admin/options-general.php?page=scripts-to-footer3.3433.37

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Scripts To Footer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.18 ▼1.171.79 ▼0.1943.45 ▼6.87
Dashboard /wp-admin2,207 ▲194.84 ▼0.03102.08 ▼1.5137.28 ▼2.21
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0335.49 ▼1.7131.45 ▲0.63
Add New Post /wp-admin/post-new.php6,467 ▲4,92520.30 ▲2.27875.47 ▲235.5968.25 ▼19.38
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0599.77 ▼5.3942.22 ▼4.66
Scripts to Footer /wp-admin/options-general.php?page=scripts-to-footer8622.0625.8142.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/scripts-to-footerphp/includes/class-stf-admin-settings.php
    • > /wp-content/plugins/scripts-to-footerphp/includes/class-stf-functions.php
    • > /wp-content/plugins/scripts-to-footerphp/includes/class-stf-admin.php
    • > /wp-content/plugins/scripts-to-footerphp/includes/class-scripts-to-footer.php
    • > /wp-content/plugins/scripts-to-footerphp/scripts-to-footer.php
    • > /wp-content/plugins/scripts-to-footerphp/uninstall.php
    • > /wp-content/plugins/scripts-to-footerphp/includes/class-stf-public.php

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

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
5 plugin tags: javascript, performance, speed, footer, head

scripts-to-footerphp/scripts-to-footer.php 92% from 13 tests

The principal PHP file in "Scripts To Footer" v. 0.7.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("scripts-to-footerphp.php" instead of "scripts-to-footer.php")

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
Everything looks great! No dangerous files found in this plugin809 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13337940736
Markdown228073

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.78
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods58
▷ Static methods58.62%
▷ Public methods5086.21%
▷ Protected methods00.00%
▷ Private methods813.79%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected