79% oh-add-script-header-footer

Code Review | SOGO Add Script to Individual Pages Header Footer

WordPress plugin SOGO Add Script to Individual Pages Header Footer scored79%from 54 tests.

About plugin

  • Plugin page: oh-add-script-hea...
  • Plugin version: 3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2013
  • Latest release: Jan 20, 2020
  • Number of updates: 58
  • Update frequency: every 38.2 days
  • Top authors: orenhav (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

30,000+ active /363,672 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.20ms] Passed 4 tests

Server-side resources used by SOGO Add Script to Individual Pages Header Footer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.87 ▲0.71
Dashboard /wp-admin3.41 ▲0.1159.93 ▲4.29
Posts /wp-admin/edit.php3.52 ▲0.1748.39 ▼3.58
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.27 ▼29.14
Media Library /wp-admin/upload.php3.33 ▲0.1042.88 ▲3.20
Header Footer Settings /wp-admin/options-general.php?page=oh-header-footer-settings3.2832.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SOGO Add Script to Individual Pages Header Footer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.121.81 ▲0.1343.44 ▲2.01
Dashboard /wp-admin2,199 ▲185.58 ▼0.1492.12 ▼13.9943.11 ▲3.73
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0434.42 ▼5.0232.38 ▼0.79
Add New Post /wp-admin/post-new.php6,361 ▲4,83525.87 ▲2.76914.77 ▲261.1588.35 ▲29.91
Media Library /wp-admin/upload.php1,401 ▼24.08 ▼0.10110.29 ▲7.3147.02 ▲4.30
Header Footer Settings /wp-admin/options-general.php?page=oh-header-footer-settings9132.0128.6629.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=oh-header-footer-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=oh-header-footer-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/oh-add-script-header-footer/metaboxes/oh-header-footer-metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/oh-add-script-header-footer/oh-settings-page.php:321
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/oh-add-script-header-footer/oh-terms-settings.php:108
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/oh-add-script-header-footer/oh-add-script-header-footer.php:16

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 Passed 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: header, re-marketing code, footer, js, javascript

oh-add-script-header-footer/oh-add-script-header-footer.php Passed 13 tests

This is the main PHP file of "SOGO Add Script to Individual Pages Header Footer" version 3.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
create a simple way to add js code to individual page post or custom post type header

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected493 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP416290493

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.00
▷ Minimum class complexity11.00
▷ Maximum class complexity21.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants2
▷ Global constants2100.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