78% advanced-iframe

Code Review | Advanced iFrame

WordPress plugin Advanced iFrame scored78%from 54 tests.

About plugin

  • Plugin page: advanced-iframe
  • Plugin version: 2023.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2011
  • Latest release: Nov 10, 2023
  • Number of updates: 145
  • Update frequency: every 31.0 days
  • Top authors: mdempfle (100%)

Code review

54 tests

User reviews

51 reviews

Install metrics

60,000+ active /1,759,223 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▲4.68ms] Passed 4 tests

Server-side resources used by Advanced iFrame
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4747.76 ▲5.62
Dashboard /wp-admin3.78 ▲0.4757.01 ▲12.74
Posts /wp-admin/edit.php3.83 ▲0.4757.35 ▲7.21
Add New Post /wp-admin/post-new.php6.32 ▲0.4395.28 ▼1.00
Media Library /wp-admin/upload.php3.64 ▲0.4139.43 ▲6.87

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 106 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
advancediFrameAdminOptions
widget_recent-comments

Browser metrics Passed 4 tests

Advanced iFrame: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13213.78 ▼0.409.39 ▲7.6137.31 ▼8.43
Dashboard /wp-admin2,200 ▲235.63 ▼0.0293.79 ▼2.0977.88 ▲36.22
Posts /wp-admin/edit.php2,120 ▲172.01 ▲0.0239.46 ▼3.9435.08 ▼1.42
Add New Post /wp-admin/post-new.php6,385 ▲4,85927.68 ▲4.49866.14 ▲241.3935.58 ▼13.68
Media Library /wp-admin/upload.php1,414 ▲144.20 ▲0.0597.02 ▼8.2471.47 ▲29.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • advancediFrameAdminOptions
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 29× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-main-iframe.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-support.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-faq.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-include-directly.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-main-prepare.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-help-post.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-browser.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-advanced.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-forum.php
    • > /wp-content/plugins/advanced-iframe/includes/advanced-iframe-admin-find-id.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-iframe/advanced-iframe.php:25
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • 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)
You can look at the official readme.txt

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

The principal PHP file in "Advanced iFrame" v. 2023.9 is loaded by WordPress automatically on each request
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 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin15,962 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP349445057,854
PO File16787394,201
JavaScript104514172,641
CSS613620909
HTML10173357

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity108.75
▷ Minimum class complexity26.00
▷ Maximum class complexity235.00
Average method complexity5.37
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods98
▷ Static methods4545.92%
▷ Public methods98100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions6498.46%
▷ Anonymous functions11.54%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 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/how-to-find-id.png38.21KB41.35KB0.00%
img/fullscreen_close-white.png0.29KB0.24KB▼ 16.61%
img/filesave.png0.44KB0.44KB0.00%
screenshot-3.png43.63KB25.76KB▼ 40.95%
img/fullscreen_close.png0.37KB0.21KB▼ 43.34%