83% lazy-load-clarity

Code Review | Lazy Load Clarity

WordPress plugin Lazy Load Clarity scored 83% from 54 tests.

About plugin

  • Plugin page: lazy-load-clarity
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.3.0
  • WordPress version: 6.3.1
  • First release: Dec 24, 2021
  • Latest release: Aug 14, 2023
  • Number of updates: 8
  • Update frequency: every 74.7 days
  • Top authors: jorcus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.78ms] Passed 4 tests

Server-side resources used by Lazy Load Clarity
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.47 ▼1.33
Dashboard /wp-admin3.35 ▲0.0447.67 ▼4.71
Posts /wp-admin/edit.php3.46 ▲0.1048.97 ▼1.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.55 ▲6.15
Media Library /wp-admin/upload.php3.27 ▲0.0435.33 ▲0.63
Lazy Load Clarity /wp-admin/options-general.php?page=lazyload-clarity-plugin3.2330.60

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazy Load Clarity
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.22 ▼1.534.94 ▲3.1442.15 ▲0.02
Dashboard /wp-admin2,207 ▲194.88 ▼1.04109.94 ▲3.1244.27 ▼1.32
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0240.46 ▲0.8735.36 ▼4.69
Add New Post /wp-admin/post-new.php1,551 ▲1518.10 ▼5.24607.87 ▲6.8868.23 ▲3.02
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0396.88 ▼8.4542.54 ▼1.27
Lazy Load Clarity /wp-admin/options-general.php?page=lazyload-clarity-plugin8472.0324.7639.52

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • 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 smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazy-load-clarity/admin/class-lazyload_clarity-admin.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Currently no screenshot available yet.)
The official readme.txt might help

lazy-load-clarity/lazyload_clarity.php 85% from 13 tests

"Lazy Load Clarity" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lazy-load-clarity.php" instead of "lazyload_clarity.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
There were no executable files found in this plugin165 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP672312165

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin