78% iframe-responsive-lazy-load

Code Review | iframe - Responsive, Lazy Load

WordPress plugin iframe - Responsive, Lazy Load scored78%from 54 tests.

About plugin

  • Plugin page: iframe-responsive...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.4
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Jun 18, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wpacho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼5.34ms] Passed 4 tests

This is a short check of server-side resources used by iframe - Responsive, Lazy Load
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7042.04 ▼2.86
Dashboard /wp-admin3.56 ▲0.2647.70 ▼2.85
Posts /wp-admin/edit.php3.61 ▲0.2643.67 ▼1.34
Add New Post /wp-admin/post-new.php6.08 ▲0.1981.69 ▼14.30
Media Library /wp-admin/upload.php3.42 ▲0.1935.35 ▼0.38
iframe RLL /wp-admin/options-general.php?page=iframe-rll3.4030.53

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 8 new options
New WordPress options
widget_iframerll_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
iframeRLL_fields

Browser metrics Passed 4 tests

This is an overview of browser requirements for iframe - Responsive, Lazy Load
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.59 ▼1.242.70 ▲0.9442.69 ▼0.39
Dashboard /wp-admin2,215 ▲334.90 ▼1.0099.24 ▼17.2037.83 ▼10.98
Posts /wp-admin/edit.php2,095 ▲62.19 ▲0.1834.56 ▼2.0635.11 ▲3.27
Add New Post /wp-admin/post-new.php1,533 ▲1623.34 ▲5.71628.83 ▼23.0348.49 ▼9.43
Media Library /wp-admin/upload.php1,394 ▲34.25 ▲0.0498.85 ▼6.4040.17 ▼5.38
iframe RLL /wp-admin/options-general.php?page=iframe-rll1,0442.2323.2036.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_iframerll_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/bin/entities.php
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/test/HTML5/Serializer/TraverserTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\InputStream' not found in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/test/HTML5/ElementsTest.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/iframe-responsive-lazy-load/includes/views/admin-editor-btn.php:2
    • > PHP Warning
      require(wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/test/benchmark/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/test/benchmark/run.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/iframe-responsive-lazy-load/includes/class-widgets.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iframe_RLL() in wp-content/plugins/iframe-responsive-lazy-load/includes/views/admin-iframe-rll-page.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\InstructionProcessor' not found in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/test/HTML5/Parser/InstructionProcessorMock.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php:9
    • > PHP Fatal error
      require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/iframe-responsive-lazy-load/assests/vendor/masterminds/html5/example.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention: The official readme.txt is a good inspiration

iframe-responsive-lazy-load/iframeRLL.php 85% from 13 tests

This is the main PHP file of "iframe - Responsive, Lazy Load" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("iframe-responsive-lazy-load.php" instead of "iframeRLL.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin16,576 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP541,4622,54710,742
HTML41,089565,286
CSS231305
Markdown2390110
JSON10071
JavaScript29545
XML10017

PHP code Passed 2 tests

A short review 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.22
Average class complexity13.49
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces9
Interfaces4
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes12.56%
Methods418
▷ Static methods194.55%
▷ Public methods35584.93%
▷ Protected methods5813.88%
▷ Private methods51.20%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants72
▷ Global constants912.50%
▷ Class constants6387.50%
▷ Public constants63100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin