84% slimfast-youtube-lazyloader

Code Review | SlimFast - YouTube Lazyloader

WordPress plugin SlimFast - YouTube Lazyloader scored84%from 54 tests.

About plugin

  • Plugin page: slimfast-youtube-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 4, 2020
  • Latest release: Aug 7, 2020
  • Number of updates: 11
  • Update frequency: every 21.4 days
  • Top authors: thinksmall1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by SlimFast - YouTube Lazyloader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.02 ▲6.77
Dashboard /wp-admin3.32 ▲0.0150.26 ▼6.03
Posts /wp-admin/edit.php3.37 ▲0.0149.40 ▼3.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.59 ▼13.37
Media Library /wp-admin/upload.php3.24 ▲0.0140.60 ▲1.75
SlimFast YouTube LazyLoader /wp-admin/options-general.php?page=slimfast_fields3.2130.77

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SlimFast - YouTube Lazyloader
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.151.69 ▼0.1243.56 ▲3.27
Dashboard /wp-admin2,196 ▲225.57 ▼0.1986.62 ▼9.3236.87 ▼9.37
Posts /wp-admin/edit.php2,104 ▲11.98 ▲0.0336.16 ▼0.6730.64 ▼9.19
Add New Post /wp-admin/post-new.php1,531 ▲523.16 ▼0.42664.69 ▼14.9454.21 ▲4.04
Media Library /wp-admin/upload.php1,407 ▲104.17 ▼0.05104.85 ▼8.6148.19 ▲1.35
SlimFast YouTube LazyLoader /wp-admin/options-general.php?page=slimfast_fields7982.0323.7027.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/slimfast-youtube-lazyloader/slimfast-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/slimfast-youtube-lazyloader/slimfast.php:14

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: lazyload, video, lazy load, iframe, youtube...

slimfast-youtube-lazyloader/slimfast.php 85% from 13 tests

The main PHP file in "SlimFast - YouTube Lazyloader" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 191 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("slimfast-youtube-lazyloader.php" instead of "slimfast.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin199 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP231897
CSS113172
JavaScript14030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 images were found in this plugin