78% sarvarov-lazy-load

Code Review | SARVAROV Lazy Load

WordPress plugin SARVAROV Lazy Load scored78%from 54 tests.

About plugin

  • Plugin page: sarvarov-lazy-load
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Aug 13, 2019
  • Latest release: May 23, 2020
  • Number of updates: 23
  • Update frequency: every 12.4 days
  • Top authors: rom4i (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /963 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.29MB] [CPU: ▼3.64ms] Passed 4 tests

An overview of server-side resources used by SARVAROV Lazy Load
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1942.00 ▼1.56
Dashboard /wp-admin3.66 ▲0.3647.36 ▼0.02
Posts /wp-admin/edit.php3.71 ▲0.3647.60 ▼0.61
Add New Post /wp-admin/post-new.php6.18 ▲0.3092.43 ▼12.35
Media Library /wp-admin/upload.php3.52 ▲0.3036.68 ▲0.86
Lazy Load /wp-admin/options-general.php?page=sarvarov_lazy_load_settings3.5034.39

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for SARVAROV Lazy Load
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲16113.65 ▼0.786.78 ▲5.0543.91 ▲3.23
Dashboard /wp-admin2,210 ▲225.88 ▲1.01105.50 ▲0.3742.92 ▼1.78
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0739.86 ▼1.9735.29 ▼0.29
Add New Post /wp-admin/post-new.php1,517 ▼1117.71 ▼0.79631.68 ▲22.4757.55 ▲4.99
Media Library /wp-admin/upload.php1,392 ▲44.27 ▲0.0696.97 ▲1.0443.08 ▼0.66
Lazy Load /wp-admin/options-general.php?page=sarvarov_lazy_load_settings1,8658.54120.4642.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sarvarov-lazy-load/admin/partials/sections.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/sarvarov-lazy-load/admin/partials/sidebar.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=sarvarov_lazy_load_settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/sarvarov-lazy-load/admin/js/wp-color-picker-alpha.js?ver=6.3.1 23:16 Uncaught ReferenceError: wpColorPickerL10n is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

sarvarov-lazy-load/sarvarov-lazy-load.php 92% from 13 tests

Analyzing the main PHP file in "SARVAROV Lazy Load" version 1.1.0
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)

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
Success! There were no dangerous files found in this plugin2,918 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP123766851,668
JavaScript7243178982
CSS34518268

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity39.33
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods3265.31%
▷ Protected methods00.00%
▷ Private methods1734.69%
Functions21
▷ Named functions29.52%
▷ Anonymous functions1990.48%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin