84% ng-lazyload

Code Review | NG-Lazyload

WordPress plugin NG-Lazyload scored 84% from 54 tests.

About plugin

  • Plugin page: ng-lazyload
  • Plugin version: 1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9.3
  • WordPress version: 6.3.1
  • First release: May 2, 2019
  • Latest release: May 1, 2022
  • Number of updates: 14
  • Update frequency: every 78.3 days
  • Top authors: nikitaglobal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.69ms] Passed 4 tests

Analyzing server-side resources used by NG-Lazyload
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.07 ▼0.10
Dashboard /wp-admin3.33 ▲0.0344.65 ▼10.02
Posts /wp-admin/edit.php3.38 ▲0.0246.32 ▲2.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.91 ▲4.60
Media Library /wp-admin/upload.php3.25 ▲0.0235.88 ▲0.67

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for NG-Lazyload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲15113.51 ▼0.778.84 ▲6.8441.49 ▼3.90
Dashboard /wp-admin2,203 ▲155.77 ▼0.12104.12 ▼11.5738.73 ▼12.17
Posts /wp-admin/edit.php2,089 ▼32.17 ▲0.2038.89 ▼17.9735.33 ▼16.43
Add New Post /wp-admin/post-new.php1,534 ▲623.28 ▲4.88636.58 ▲8.3154.88 ▲0.31
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.02112.26 ▲12.9556.17 ▲10.81

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
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ng-lazyload/NG-Lazyload.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: images, thumbnail, lazyload, lazy load, optimize content

ng-lazyload/NG-Lazyload.php 92% from 13 tests

The main PHP file in "NG-Lazyload" ver. 1.8 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ng-lazyload.php" instead of "NG-Lazyload.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin162 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11187124
JavaScript12034
CSS1003
HTML1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png14.06KB8.03KB▼ 42.93%