84% param-iframe-generator

Code Review | Param Iframe Generator

WordPress plugin Param Iframe Generator scored84%from 54 tests.

About plugin

  • Plugin page: param-iframe-gene...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 1, 2018
  • Latest release: Mar 1, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: tjthouhid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Param Iframe Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.86 ▼4.32
Dashboard /wp-admin3.31 ▼0.0345.27 ▼12.16
Posts /wp-admin/edit.php3.36 ▲0.0144.71 ▼4.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.48 ▼14.56
Media Library /wp-admin/upload.php3.23 ▲0.0138.84 ▲2.84

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Param Iframe Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.281.73 ▼0.8144.62 ▼3.08
Dashboard /wp-admin2,192 ▲125.62 ▼0.0491.30 ▲7.6140.20 ▼5.48
Posts /wp-admin/edit.php2,105 ▲51.94 ▼0.0539.74 ▲3.9433.96 ▲0.31
Add New Post /wp-admin/post-new.php1,526 ▼223.42 ▲0.39663.58 ▲21.5153.22 ▲3.48
Media Library /wp-admin/upload.php1,403 ▲64.26 ▲0.0296.44 ▼5.0642.31 ▼1.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/param-iframe-generator/param-iframe-generator.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

param-iframe-generator/param-iframe-generator.php Passed 13 tests

"Param Iframe Generator" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
This is plugin for creating iframe by current page get url parameter.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected47 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13924
Markdown19023

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin