93% flynsarmy-iframe-shortcode

Code Review | IFrame Shortcode

WordPress plugin IFrame Shortcode scored 93% from 54 tests.

About plugin

  • Plugin page: flynsarmy-iframe-...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.5.1
  • WordPress version: 5.9.2
  • First release: Nov 15, 2013
  • Latest release: May 3, 2016
  • Number of updates: 19
  • Update frequency: every 48.5 days
  • Top authors: flynsarmy (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active / 23,094 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼296.99ms] Passed 4 tests

Server-side resources used by IFrame Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0252.91 ▲2.42
Dashboard /wp-admin3.43 ▲0.0333.61 ▲1.41
Posts /wp-admin/edit.php3.66 ▲0.0234.40 ▼3.51
Add New Post /wp-admin/post-new.php6.90 ▼0.0790.60 ▼1,183.37
Media Library /wp-admin/upload.php3.31 ▲0.0223.47 ▼2.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for IFrame Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.20 ▲0.165.83 ▼0.652.66 ▲0.23
Dashboard /wp-admin2,888 ▲376.13 ▼0.02115.91 ▼24.00156.36 ▼10.61
Posts /wp-admin/edit.php2,694 ▲33.06 ▼0.1766.13 ▲1.40142.42 ▼1.98
Add New Post /wp-admin/post-new.php1,668 ▼4319.15 ▼2.13379.51 ▼74.25157.51 ▼3.62
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.07144.63 ▲1.11195.97 ▲6.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/flynsarmy-iframe-shortcode/partials/iframe.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/flynsarmy-iframe-shortcode/flyniframe.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/flynsarmy-iframe-shortcode/scripts/iframe.js.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (TinyMCE button for adding an IFrame), #2 (TinyMCE popup for adding an IFrame)
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

flynsarmy-iframe-shortcode/flyniframe.php 85% from 13 tests

The main PHP file in "IFrame Shortcode" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 180 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("flynsarmy-iframe-shortcode.php" instead of "flyniframe.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected143 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31915143

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.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
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.85KB19.12KB▼ 60.87%
screenshot-2.png48.54KB15.91KB▼ 67.23%
iframe.png5.81KB3.26KB▼ 43.90%