84% iframe-block

Code Review | iFrame Block

WordPress plugin iFrame Block scored84%from 54 tests.

About plugin

  • Plugin page: iframe-block
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jul 1, 2022
  • Latest release: Jul 1, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: vikas4travel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.50ms] Passed 4 tests

This is a short check of server-side resources used by iFrame Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.25 ▼0.70
Dashboard /wp-admin3.32 ▼0.0244.55 ▼14.57
Posts /wp-admin/edit.php3.37 ▲0.0147.45 ▲3.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.10 ▼19.08
Media Library /wp-admin/upload.php3.25 ▲0.0132.57 ▲0.36

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for iFrame Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.58 ▼0.801.49 ▼0.1942.97 ▲2.83
Dashboard /wp-admin2,206 ▲154.84 ▼1.06108.77 ▲1.8640.11 ▼3.32
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0339.64 ▲3.4735.02 ▼1.76
Add New Post /wp-admin/post-new.php6,186 ▲4,65319.34 ▼4.05915.69 ▲321.1765.82 ▲20.59
Media Library /wp-admin/upload.php1,388 ▼04.24 ▼0.0792.73 ▼7.4943.59 ▲0.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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
Please take a closer look at the following
  • 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/iframe-block/iframe-block.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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: insert iframe, iframe block

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

Analyzing the main PHP file in "iFrame Block" version 0.1.0
57 characters long description:
iFrame Block lets you insert iframes in the block editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin543 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript174168375
JSON10067
CSS2101958
Markdown117037
PHP21226

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin