10% advanced-iframe

Code Review | Advanced iFrame

WordPress plugin Advanced iFrame scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-iframe
  • Plugin version: 2022.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.9
  • WordPress version: 5.9.2
  • First release: Jul 22, 2011
  • Latest release: Feb 4, 2022
  • Number of updates: 134
  • Update frequency: every 28.8 days
  • Top authors: mdempfle (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

70,000+ active / 1,388,894 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/advanced-iframe/advanced-iframe.php+753
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.88MB] [CPU: ▼337.29ms] Passed 4 tests

A check of server-side resources used by Advanced iFrame
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.1219.91 ▼32.61
Dashboard /wp-admin3.55 ▲0.1424.62 ▼63.74
Posts /wp-admin/edit.php3.56 ▼0.0824.16 ▼13.75
Add New Post /wp-admin/post-new.php3.53 ▼3.4421.56 ▼1,239.05
Media Library /wp-admin/upload.php3.57 ▲0.2819.93 ▼3.98

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 99 new files
Database: no new tables, 1 new option
New WordPress options
advancediFrameAdminOptions

Browser metrics Passed 4 tests

A check of browser resources used by Advanced iFrame
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,935 ▲18116.24 ▲1.089.76 ▲2.882.56 ▼0.15
Dashboard /wp-admin2,917 ▲566.18 ▲0.04116.48 ▼22.80191.33 ▲30.56
Posts /wp-admin/edit.php2,714 ▲123.01 ▼0.2369.19 ▼35.50142.02 ▼19.14
Add New Post /wp-admin/post-new.php1,687 ▲2616.23 ▼6.50432.91 ▼1.59240.47 ▲37.57
Media Library /wp-admin/upload.php1,719 ▲285.56 ▲0.05129.30 ▼19.82253.84 ▲32.89
Advanced iFrame /wp-admin/advanced-iframe.php260.940.0321.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/advanced-iframe/advanced-iframe.php+100
    Undefined index: src
  • The uninstall procedure has failed, leaving 1 option in the database
    • advancediFrameAdminOptions

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 29× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-functions.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-find-id.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-lazy-load.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-browser.php
    • > /wp-content/plugins/advanced-iframe/advanced-iframe-admin-page.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-faq.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-zoom.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-twg.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-advanced.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-parameters.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: html in wp-content/plugins/advanced-iframe/includes/advanced-iframe-main-read-config.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-iframe/includes/advanced-iframe-main-read-config.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-iframe/advanced-iframe.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/advanced-iframe.php
    • > Network (severe)
    wp-admin/advanced-iframe.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Comparison between normal iframe and advanced iframe wrapper. The red areas are modified by the advanced iframe to display the content better.), #2 (This image shows the difference with an url forward parameter. In the advanced iframe a sub album is shown while the normal iframe still shows the entry screen.), #3 (The basic admin screen to enable standard settings), #4 (The advanced admin screen to enable advanced settings like html and css changes), #5 (The advanced admin screen to enable Javascript scroll to top and autoresize resize)
The official readme.txt is a good inspiration

advanced-iframe/advanced-iframe.php Passed 13 tests

This is the main PHP file of "Advanced iFrame" version 2022.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
99 characters long description:
This plugin includes any webpage as shortcode in an advanced iframe or embeds the content directly.

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
Everything looks great! No dangerous files found in this plugin15,022 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP348804817,324
PO File16346993,961
JavaScript104254072,510
CSS613220897
HTML9133330

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity97.75
▷ Minimum class complexity26.00
▷ Maximum class complexity207.00
Average method complexity5.30
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods90
▷ Static methods4044.44%
▷ Public methods90100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions61
▷ Named functions61100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.60MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo_16x16.png0.86KB1.00KB0.00%
screenshot-2.png242.54KB96.56KB▼ 60.19%
screenshot-4.png36.33KB23.25KB▼ 36.00%
img/close.png0.66KB0.67KB0.00%
img/jfu_logo_32x32.png1.68KB1.69KB0.00%