73% responsive-iframes

Code Review | BJD Responsive iFrame

WordPress plugin BJD Responsive iFrame scored73%from 54 tests.

About plugin

  • Plugin page: responsive-iframes
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 19, 2015
  • Latest release: May 19, 2015
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: BenJD (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /6,212 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.93MB] [CPU: ▼49.28ms] Passed 4 tests

Server-side resources used by BJD Responsive iFrame
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.70 ▼33.36
Dashboard /wp-admin2.08 ▼1.237.31 ▼42.55
Posts /wp-admin/edit.php2.08 ▼1.285.10 ▼43.29
Add New Post /wp-admin/post-new.php2.08 ▼3.814.80 ▼77.91
Media Library /wp-admin/upload.php2.08 ▼1.154.70 ▼30.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BJD Responsive iFrame
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.72 ▲0.371.89 ▲0.1744.84 ▲3.14
Dashboard /wp-admin2,194 ▲205.51 ▼0.0685.43 ▼0.8139.14 ▼0.90
Posts /wp-admin/edit.php2,102 ▲22.03 ▲0.0835.48 ▼1.1630.93 ▼2.31
Add New Post /wp-admin/post-new.php1,528 ▲223.71 ▼0.06670.45 ▼2.7150.40 ▼12.84
Media Library /wp-admin/upload.php1,393 ▼44.19 ▲0.0297.00 ▲1.5042.43 ▲1.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bjd-responsive-iframe-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/responsive-iframes/bjd-responsive-iframe.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot1.png. This shows a responsive iframe on a desktop machine.), #2 (This screen shot description corresponds to screenshot2.png. This shows a responsive iframe on a mobile device.)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === responsive-iframes === )
Please take inspiration from this readme.txt

responsive-iframes/bjd-responsive-iframe.php 92% from 13 tests

The primary PHP file in "BJD Responsive iFrame" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("responsive-iframes.php" instead of "bjd-responsive-iframe.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
Success! There were no dangerous files found in this plugin59 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17944
CSS11015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity7.00
▷ Minimum method complexity7.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.40MB with 0.27MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot2.png180.61KB53.61KB▼ 70.32%
screenshot1.png226.85KB76.59KB▼ 66.24%