94% embed-code

Code Review | Embed Code - Headers & Footers by DesignBombs

WordPress plugin Embed Code - Headers & Footers by DesignBombs scored 94% from 54 tests.

About plugin

  • Plugin page: embed-code
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 5.8.1
  • First release: Jan 5, 2015
  • Latest release: Aug 4, 2021
  • Number of updates: 23
  • Update frequency: every 104.5 days
  • Top authors: GalenGidman (60.87%)wpkube (43.48%)

Code review

54 tests

User reviews

6 reviews

Install metrics

9,000+ active / 46,039 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼177.59ms] Passed 4 tests

An overview of server-side resources used by Embed Code - Headers & Footers by DesignBombs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0235.41 ▲5.30
Dashboard /wp-admin3.20 ▲0.1442.74 ▼22.65
Posts /wp-admin/edit.php3.25 ▲0.1442.37 ▼3.67
Add New Post /wp-admin/post-new.php5.58 ▲0.1488.13 ▼687.11
Media Library /wp-admin/upload.php3.14 ▲0.1434.65 ▲3.06
Embed Code /wp-admin/options-general.php?page=ec_options3.1732.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 372 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Embed Code - Headers & Footers by DesignBombs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲14916.06 ▲0.419.72 ▼1.5543.48 ▼13.43
Dashboard /wp-admin3,007 ▲736.27 ▲0.04155.68 ▼0.64100.21 ▼37.92
Posts /wp-admin/edit.php2,754 ▲152.73 ▲0.0167.33 ▼1.9091.18 ▲1.13
Add New Post /wp-admin/post-new.php1,776 ▼10016.53 ▼2.66390.74 ▲16.55155.13 ▲48.90
Media Library /wp-admin/upload.php1,828 ▲215.05 ▲0.03146.17 ▼10.06111.67 ▼12.99
Embed Code /wp-admin/options-general.php?page=ec_options1,1752.3759.0793.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 39× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/helper-functions.php:127
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/embed-code/includes/vendor/cmb2/includes/types/CMB2_Type_Text_Time.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: header code, footer code, embed code, tracking code, embed javascript

embed-code/embed-code.php Passed 13 tests

Analyzing the main PHP file in "Embed Code - Headers & Footers by DesignBombs" version 2.0.4
103 characters long description:
The easiest way to embed code in the head or footer of your site, globally or on a per-page/post basis.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected47,495 lines of code in 224 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78717,89031,582

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity19.32
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
▷ Abstract classes811.76%
▷ Concrete classes6088.24%
▷ Final classes00.00%
▷ Static methods8115.11%
▷ Public methods44082.09%
▷ Protected methods9317.35%
▷ Private methods30.56%
▷ Named functions51100.00%
▷ Anonymous functions00.00%
▷ Global constants857.14%
▷ Class constants642.86%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vendor/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
includes/vendor/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
includes/vendor/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%