84% embed-iframe

Code Review | Embed Iframe

WordPress plugin Embed Iframe scored84%from 54 tests.

About plugin

  • Plugin page: embed-iframe
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.3-6.0
  • WordPress version: 6.3.1
  • First release: Nov 17, 2008
  • Latest release: Jun 1, 2022
  • Number of updates: 21
  • Update frequency: every 235.4 days
  • Top authors: brajesh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /133,684 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼2.87ms] Passed 4 tests

A check of server-side resources used by Embed Iframe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.93 ▼3.87
Dashboard /wp-admin3.31 ▲0.0147.28 ▼0.93
Posts /wp-admin/edit.php3.36 ▲0.0145.37 ▼1.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.10 ▼5.26
Media Library /wp-admin/upload.php3.23 ▲0.0134.74 ▲0.10

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed Iframe
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.551.90 ▲0.3445.18 ▲5.18
Dashboard /wp-admin2,206 ▲145.89 ▲0.9397.94 ▼8.1538.02 ▼6.34
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0334.35 ▼3.4734.56 ▲3.97
Add New Post /wp-admin/post-new.php1,534 ▲2023.31 ▲5.75627.09 ▼50.0353.23 ▼6.05
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0299.27 ▼3.9742.56 ▲0.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/embed-iframe/view/embediframe/iframe.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-iframe/plugin.php:150

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: iframe, embed, post, plugin, page

embed-iframe/embediframe.php 85% from 13 tests

"Embed Iframe" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("embed-iframe.php" instead of "embediframe.php")
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP383223219

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.50
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin