84% simple-embed-code

Code Review | Code Embed

WordPress plugin Code Embed scored84%from 54 tests.

About plugin

  • Plugin page: simple-embed-code
  • Plugin version: 2.3.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Apr 5, 2009
  • Latest release: Nov 21, 2023
  • Number of updates: 463
  • Update frequency: every 11.5 days
  • Top authors: dartiss (87.47%)DarkDesigns (6.7%)codedart (6.26%)

Code review

54 tests

User reviews

45 reviews

Install metrics

20,000+ active /395,555 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.66ms] Passed 4 tests

An overview of server-side resources used by Code Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.17 ▼7.97
Dashboard /wp-admin3.34 ▲0.0445.62 ▼2.89
Posts /wp-admin/edit.php3.39 ▲0.0447.95 ▼3.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.20 ▲6.64
Media Library /wp-admin/upload.php3.27 ▲0.0435.94 ▼0.79
Code Search /wp-admin/tools.php?page=ce-search3.2431.75
Code Embed /wp-admin/options-general.php?page=ce-options3.2830.95

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

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

Browser metrics Passed 4 tests

Code Embed: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3814.57 ▼0.171.56 ▼0.0838.59 ▼6.32
Dashboard /wp-admin2,206 ▲325.61 ▼0.0496.00 ▲5.8242.41 ▼2.68
Posts /wp-admin/edit.php2,108 ▲51.94 ▼0.1639.46 ▼4.1535.34 ▼3.11
Add New Post /wp-admin/post-new.php1,541 ▲1525.01 ▲1.83609.45 ▼43.7160.45 ▲0.05
Media Library /wp-admin/upload.php1,408 ▲114.16 ▲0.0195.96 ▼2.1841.01 ▼2.06
Code Search /wp-admin/tools.php?page=ce-search8262.0027.1728.04
Code Embed /wp-admin/options-general.php?page=ce-options9402.0027.5332.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/simple-embed-code/includes/search-screen.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-embed-code/includes/initialise.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-embed-code/simple-code-embed.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-embed-code/includes/add-embeds.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/simple-embed-code/includes/options-screen.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-embed-code/includes/admin-config.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-embed-code/includes/add-scripts.php:22

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: javascript, html, css, embed, code...

simple-embed-code/simple-code-embed.php 92% from 13 tests

This is the main PHP file of "Code Embed" version 2.3.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-embed-code.php" instead of "simple-code-embed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected408 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8221262392
CSS21016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin