84% native-lazyload

Code Review | Native Lazyload

WordPress plugin Native Lazyload scored84%from 54 tests.

About plugin

  • Plugin page: native-lazyload
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2019
  • Latest release: Dec 6, 2019
  • Number of updates: 8
  • Update frequency: every 12.4 days
  • Top authors: flixos90 (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

9,000+ active /80,722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.96ms] Passed 4 tests

This is a short check of server-side resources used by Native Lazyload
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.81 ▼5.08
Dashboard /wp-admin3.38 ▲0.0751.17 ▲0.44
Posts /wp-admin/edit.php3.50 ▲0.1453.19 ▲1.70
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.76 ▼4.91
Media Library /wp-admin/upload.php3.30 ▲0.0739.55 ▲4.65

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Native Lazyload
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.002.20 ▲0.4444.38 ▲3.75
Dashboard /wp-admin2,198 ▲215.57 ▼0.0589.33 ▼0.2145.61 ▲1.49
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0137.77 ▼1.5236.60 ▼3.15
Add New Post /wp-admin/post-new.php1,526 ▼023.34 ▲0.00693.17 ▼2.5756.13 ▲1.37
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0199.50 ▼7.3344.48 ▼3.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/native-lazyload/native-lazyload.php:35

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: load, lazyload, iframes, loading, images...

native-lazyload/native-lazyload.php Passed 13 tests

This is the main PHP file of "Native Lazyload" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
50 characters long description:
Lazy-loads media using the native browser feature.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected449 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP590358355
JavaScript2113393
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.50
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2177.78%
▷ Protected methods622.22%
▷ Private methods00.00%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin