10% responsive-iframe-watchdog

Code Review | Responsive Iframe Watchdog

WordPress plugin Responsive Iframe Watchdog scored10%from 54 tests.

About plugin

  • Plugin page: responsive-iframe...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: Dec 7, 2017
  • Number of updates: 33
  • Update frequency: every 4.1 days
  • Top authors: lgrapplications (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /793 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/responsive-iframe-watchdog/lgr_responsive_iframe_watchdog.php+367
    Undefined variable: wp_version

Server metrics [RAM: ▼0.33MB] [CPU: ▼19.74ms] Passed 4 tests

An overview of server-side resources used by Responsive Iframe Watchdog
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0228.98 ▼10.64
Dashboard /wp-admin3.21 ▼0.0929.83 ▼17.70
Posts /wp-admin/edit.php3.31 ▼0.0433.12 ▼12.86
Add New Post /wp-admin/post-new.php4.67 ▼1.2142.31 ▼37.74
Media Library /wp-admin/upload.php3.25 ▲0.0228.95 ▼5.37
Responsive Iframe Watchdog /wp-admin/options-general.php?page=lgrriw_pluginPage3.1627.41

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Iframe Watchdog
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.87 ▼0.721.55 ▼0.2539.70 ▼2.81
Dashboard /wp-admin2,232 ▲415.17 ▲0.28103.47 ▲4.1137.84 ▼1.00
Posts /wp-admin/edit.php2,117 ▲312.51 ▲0.5137.03 ▼1.8831.84 ▲0.09
Add New Post /wp-admin/post-new.php1,539 ▲2523.49 ▲5.88669.04 ▼14.8340.31 ▼14.38
Media Library /wp-admin/upload.php1,408 ▲234.47 ▲0.2296.41 ▼5.0745.17 ▲0.93
Responsive Iframe Watchdog /wp-admin/options-general.php?page=lgrriw_pluginPage9312.2933.3327.34

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lgrriw_pluginPage
    • > Notice in wp-content/plugins/responsive-iframe-watchdog/lgr_responsive_iframe_watchdog.php+235
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=lgrriw_pluginPage
    • > Warning in wp-content/plugins/responsive-iframe-watchdog/admin/includes/lgr_responsive_iframe_watchdog_options_page.php+46
    Use of undefined constant BLOG_ID_CURRENT_SITE - assumed 'BLOG_ID_CURRENT_SITE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=lgrriw_pluginPage
    • > Warning in wp-content/plugins/responsive-iframe-watchdog/admin/includes/lgr_responsive_iframe_watchdog_options_page.php+348
    Use of undefined constant pluginName - assumed 'pluginName' (this will throw an Error in a future version of PHP)

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-iframe-watchdog/lgr_responsive_iframe_watchdog.php:31

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt might help

responsive-iframe-watchdog/lgr_responsive_iframe_watchdog.php 92% from 13 tests

The main file in "Responsive Iframe Watchdog" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("responsive-iframe-watchdog.php" instead of "lgr_responsive_iframe_watchdog.php")

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
There were no executable files found in this plugin7,020 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
HTML557202,513
CSS123462382,284
JavaScript111323091,541
PHP2926204483
SVG101106
XML70093

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
38 PNG files occupy 2.64MB with 1.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Khloe_Cropped_222_badge_Feathered_webized_2.png19.88KB18.35KB▼ 7.66%
assets/youtube_20.png3.85KB1.28KB▼ 66.79%
assets/tinymce-button_32_1.png5.61KB1.79KB▼ 68.05%
assets/screenshot-8.png148.08KB39.24KB▼ 73.50%
assets/other_video.png3.86KB1.24KB▼ 67.81%