78% lh-css-lazy-load

Code Review | LH CSS Lazy Load

WordPress plugin LH CSS Lazy Load scored 78% from 54 tests.

About plugin

  • Plugin page: lh-css-lazy-load
  • Plugin version: 1.02
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Jun 6, 2019
  • Number of updates: 5
  • Update frequency: every 112.4 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 2,621 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.44ms] Passed 4 tests

This is a short check of server-side resources used by LH CSS Lazy Load
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.61 ▼2.75
Dashboard /wp-admin3.33 ▲0.0347.12 ▼0.78
Posts /wp-admin/edit.php3.39 ▲0.0347.25 ▼4.59
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.80 ▼8.94
Media Library /wp-admin/upload.php3.26 ▲0.0336.25 ▼1.48
CSS Lazy Load /wp-admin/options-general.php?page=lh-css-lazy-load/lh-css-lazy-load.php3.2230.75

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LH CSS Lazy Load
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.32 ▼1.264.44 ▲2.5541.24 ▲1.56
Dashboard /wp-admin2,210 ▲224.86 ▼0.19107.55 ▼9.7537.12 ▼4.93
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0040.66 ▼2.2535.98 ▲0.49
Add New Post /wp-admin/post-new.php1,517 ▼1717.68 ▼5.46662.08 ▼20.9351.25 ▼25.90
Media Library /wp-admin/upload.php1,386 ▼24.15 ▼0.1699.19 ▼0.7543.41 ▼0.09
CSS Lazy Load /wp-admin/options-general.php?page=lh-css-lazy-load/lh-css-lazy-load.php7732.0524.2926.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=lh-css-lazy-load/lh-css-lazy-load.php
    • > Notice in wp-content/plugins/lh-css-lazy-load/partials/options-general.php+8
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=lh-css-lazy-load/lh-css-lazy-load.php
    • > Warning in wp-content/plugins/lh-css-lazy-load/partials/options-general.php+8
    implode(): Invalid arguments passed

SRP 50% 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-css-lazy-load/partials/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-css-lazy-load/partials/options-general.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: lazy load, css, defer, async, javascript

lh-css-lazy-load/lh-css-lazy-load.php 92% from 13 tests

The main file in "LH CSS Lazy Load" v. 1.02 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin156 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP313738144
JavaScript120012

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.36
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin