90% responsive-iframe

Code Review | Responsive iframe

WordPress plugin Responsive iframe scored90%from 54 tests.

About plugin

  • Plugin page: responsive-iframe
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2020
  • Latest release: Nov 4, 2021
  • Number of updates: 11
  • Update frequency: every 42.3 days
  • Top authors: patrickpelayo (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /8,033 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Responsive iframe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.19 ▲9.93
Dashboard /wp-admin3.31 ▲0.0148.12 ▼2.19
Posts /wp-admin/edit.php3.36 ▲0.0141.97 ▼2.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.59 ▼13.70
Media Library /wp-admin/upload.php3.23 ▲0.0137.86 ▲0.77

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Responsive iframe: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲15713.49 ▼1.2410.85 ▲9.3247.11 ▲7.66
Dashboard /wp-admin2,197 ▲205.64 ▲0.0489.33 ▼13.8836.61 ▼6.20
Posts /wp-admin/edit.php2,102 ▲22.03 ▲0.0335.50 ▼2.6231.27 ▼1.17
Add New Post /wp-admin/post-new.php6,199 ▲4,67326.27 ▲2.82840.51 ▲217.2171.52 ▲10.24
Media Library /wp-admin/upload.php1,405 ▲54.20 ▼0.0397.86 ▼5.1945.58 ▼5.76

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: responsive, block, iframe

responsive-iframe/plugin.php 92% from 13 tests

"Responsive iframe" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("responsive-iframe.php" instead of "plugin.php")

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
No dangerous file extensions were detected496 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript687113382
PHP2136156
Sass33143
JSON10013
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions3
▷ Named functions3100.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
No PNG files were detected