84% auto-iframe

Code Review | Auto iFrame

WordPress plugin Auto iFrame scored84%from 54 tests.

About plugin

  • Plugin page: auto-iframe
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2015
  • Latest release: Apr 17, 2023
  • Number of updates: 44
  • Update frequency: every 66.9 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

5,000+ active /68,753 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.81ms] Passed 4 tests

Analyzing server-side resources used by Auto iFrame
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.80 ▼0.67
Dashboard /wp-admin3.33 ▲0.0248.92 ▼6.10
Posts /wp-admin/edit.php3.38 ▲0.0245.96 ▼4.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.33 ▼19.91
Media Library /wp-admin/upload.php3.25 ▲0.0236.93 ▲3.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Auto iFrame: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.66 ▼0.745.01 ▲2.6743.71 ▲0.46
Dashboard /wp-admin2,200 ▲125.79 ▲0.90102.45 ▼19.6737.32 ▼7.84
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0435.59 ▲0.8633.86 ▲0.47
Add New Post /wp-admin/post-new.php1,537 ▼623.11 ▲4.97676.74 ▲67.0851.17 ▼0.68
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0293.20 ▼7.7240.79 ▼4.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-iframe/auto-iframe.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: iframe, resize

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

Analyzing the main PHP file in "Auto iFrame" version 1.7
91 characters long description:
A quick and easy shortcode to embed iframe's that resize to the content of the remote site.

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 detected125 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13034114
JavaScript13011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png5.28KB1.50KB▼ 71.54%