78% insert-php

Code Review | Woody code snippets - Insert Header Footer Code, AdSense Ads

WordPress plugin Woody code snippets - Insert Header Footer Code, AdSense Ads scored78%from 54 tests.

About plugin

  • Plugin page: insert-php
  • Plugin version: 2.4.10
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: May 25, 2023
  • Number of updates: 63
  • Update frequency: every 61.1 days
  • Top authors: webtemyk (41.27%)webcraftic (30.16%)alexkovalevv (17.46%)WillBontrager (14.29%)creativemotion (3.17%)

Code review

54 tests

User reviews

205 reviews

Install metrics

80,000+ active /1,482,802 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.80MB] [CPU: ▲16.05ms] Passed 4 tests

An overview of server-side resources used by Woody code snippets - Insert Header Footer Code, AdSense Ads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.18 ▲1.7260.87 ▲18.04
Dashboard /wp-admin6.47 ▲3.1776.67 ▲21.15
Posts /wp-admin/edit.php6.52 ▲3.1780.12 ▲26.64
Add New Post /wp-admin/post-new.php9.03 ▲3.15110.34 ▼1.62
Media Library /wp-admin/upload.php6.38 ▲3.1570.07 ▲29.34
Settings /wp-admin/edit.php?post_type=wbcr-snippets&page=settings-wbcr_insert_php7.2163.71
+ Add snippet /wp-admin/edit.php?post_type=wbcr-snippets&page=new-item-wbcr_insert_php6.3662.74
About /wp-admin/edit.php?post_type=wbcr-snippets&page=about-wbcr_insert_php6.3158.03
Snippets library /wp-admin/edit.php?post_type=wbcr-snippets&page=snippet-library-wbcr_insert_php6.3057.13
Tags /wp-admin/edit-tags.php?taxonomy=wbcr-snippet-tags&post_type=wbcr-snippets6.3966.58
License /wp-admin/edit.php?post_type=wbcr-snippets&page=license-wbcr_insert_php6.3059.98
Snippets /wp-admin/edit.php?post_type=wbcr-snippets6.5468.00
Import/Export /wp-admin/edit.php?post_type=wbcr-snippets&page=import-wbcr_insert_php6.3057.69

Server storage [IO: ▲4.14MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 450 new files
Database: no new tables, 21 new options
New WordPress options
widget_recent-posts
wbcr_inp_code_editor_highlight_selection_matches
wbcr_inp_code_editor_indent_with_tabs
wbcr_inp_activate_by_default
theysaidso_admin_options
wbcr_inp_demo_snippets_created
wbcr_inp_code_editor_line_numbers
can_compress_scripts
wbcr_inp_code_editor_auto_close_brackets
wbcr_inp_plugin_version
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woody code snippets - Insert Header Footer Code, AdSense Ads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲13313.40 ▼1.231.74 ▼0.5242.60 ▲1.39
Dashboard /wp-admin2,319 ▲1184.89 ▼0.07101.65 ▼10.2639.74 ▼4.74
Posts /wp-admin/edit.php2,205 ▲1052.18 ▲0.1740.21 ▼1.2433.62 ▼3.11
Add New Post /wp-admin/post-new.php1,604 ▲5918.23 ▼4.82620.62 ▼37.2736.11 ▼22.44
Media Library /wp-admin/upload.php1,465 ▲654.21 ▼0.04101.34 ▼3.9043.36 ▼0.63
Settings /wp-admin/edit.php?post_type=wbcr-snippets&page=settings-wbcr_insert_php1,4602.1236.9639.12
+ Add snippet /wp-admin/edit.php?post_type=wbcr-snippets&page=new-item-wbcr_insert_php1,0562.0623.4533.03
About /wp-admin/edit.php?post_type=wbcr-snippets&page=about-wbcr_insert_php1,0912.0322.7764.16
Snippets library /wp-admin/edit.php?post_type=wbcr-snippets&page=snippet-library-wbcr_insert_php9111.7324.8429.31
Tags /wp-admin/edit-tags.php?taxonomy=wbcr-snippet-tags&post_type=wbcr-snippets1,6722.1728.2834.99
License /wp-admin/edit.php?post_type=wbcr-snippets&page=license-wbcr_insert_php9462.0823.4339.70
Snippets /wp-admin/edit.php?post_type=wbcr-snippets2,3002.2436.6631.46
Import/Export /wp-admin/edit.php?post_type=wbcr-snippets&page=import-wbcr_insert_php9471.8535.0135.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 21 options in the database
    • wbcr_inp_code_editor_indent_unit
    • wbcr_inp_first_activation
    • wbcr_inp_code_editor_theme
    • wbcr_inp_plugin_activated
    • wbcr_inp_code_editor_tab_size
    • can_compress_scripts
    • wbcr_inp_code_editor_highlight_selection_matches
    • wbcr_inp_plugin_version
    • db_upgraded
    • wbcr_inp_demo_snippets_created
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/insert-php/includes/compat.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/insert-php/includes/shortcodes/shortcode-insert-php.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_FactoryForms463_FontControl' not found in wp-content/plugins/insert-php/libs/factory/forms/controls/google-font.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/insert-php/libs/factory/feedback/views/deactivate-form.php:1

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please a description for screenshot #8 in insert-php/assets to your readme.txt
The official readme.txt might help

insert-php/insert_php.php 92% from 13 tests

The main file in "Woody code snippets - Insert Header Footer Code, AdSense Ads" v. 2.4.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("insert-php.php" instead of "insert_php.php")

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 plugin36,304 lines of code in 365 files:
LanguageFilesBlank linesComment linesLines of code
PHP1875,13311,86518,042
JSON20011,089
CSS993133582,347
JavaScript565249972,140
PO File74936001,505
LESS12249491,161
Markdown26020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity16.94
▷ Minimum class complexity1.00
▷ Maximum class complexity210.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces14
Interfaces2
Traits1
Classes158
▷ Abstract classes1912.03%
▷ Concrete classes13987.97%
▷ Final classes21.44%
Methods1,053
▷ Static methods858.07%
▷ Public methods82578.35%
▷ Protected methods12912.25%
▷ Private methods999.40%
Functions61
▷ Named functions3963.93%
▷ Anonymous functions2236.07%
Constants101
▷ Global constants8786.14%
▷ Class constants1413.86%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.23MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/help.png0.15KB0.21KB0.00%
libs/factory/bootstrap/assets/images/drop-menu_arrow.png0.24KB0.25KB0.00%
admin/assets/img/snippet-cut.png2.04KB1.23KB▼ 39.67%
admin/assets/img/video.png8.70KB5.56KB▼ 36.13%
admin/assets/img/43d2351a21.png55.15KB21.66KB▼ 60.73%