84% wp-add-header-scripts

Code Review | WP Add Header Scripts

WordPress plugin WP Add Header Scripts scored 84% from 54 tests.

About plugin

  • Plugin page: wp-add-header-scr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Oct 8, 2015
  • Number of updates: 8
  • Update frequency: every 1.5 days
  • Top authors: punio.kid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,317 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.94ms] Passed 4 tests

Server-side resources used by WP Add Header Scripts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0428.43 ▼14.07
Dashboard /wp-admin3.33 ▲0.0346.39 ▼3.16
Posts /wp-admin/edit.php3.38 ▲0.0348.58 ▼1.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.51 ▼16.31
Media Library /wp-admin/upload.php3.25 ▲0.0334.78 ▼2.22
WP Add Header Scripts /wp-admin/options-general.php?page=wp-add-header-scripts/wp-add-header-scripts.php3.2832.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Add Header Scripts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,484 ▼25114.45 ▼0.330.76 ▼1.1115.16 ▼36.99
Dashboard /wp-admin2,217 ▲265.80 ▼0.1193.61 ▼7.9637.65 ▼2.31
Posts /wp-admin/edit.php2,097 ▲52.04 ▲0.0641.94 ▲1.8434.42 ▼1.34
Add New Post /wp-admin/post-new.php1,530 ▲118.39 ▼0.25590.62 ▼15.4364.15 ▲3.93
Media Library /wp-admin/upload.php1,393 ▲24.30 ▲0.1096.47 ▲1.3045.38 ▲3.47
WP Add Header Scripts /wp-admin/options-general.php?page=wp-add-header-scripts/wp-add-header-scripts.php8671.7125.1724.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-add-header-scripts/wp-add-header-scripts.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: order, head, random, multiple, script

wp-add-header-scripts/wp-add-header-scripts.php Passed 13 tests

"WP Add Header Scripts" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
86 characters long description:
WP Add Header Scripts will insert a script that was set between HEAD tag and HEAD tag.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin332 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP358107242
PO File115950
JavaScript17231
CSS1409

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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