84% loading-lazy

Code Review | loading-lazy

WordPress plugin loading-lazy scored84%from 54 tests.

About plugin

  • Plugin page: loading-lazy
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.4
  • WordPress version: 6.3.1
  • First release: May 6, 2020
  • Latest release: May 6, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: dabohaze (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /371 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.74ms] Passed 4 tests

Analyzing server-side resources used by loading-lazy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.11 ▼1.62
Dashboard /wp-admin3.31 ▼0.0448.86 ▼16.85
Posts /wp-admin/edit.php3.36 ▲0.0049.29 ▲0.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.62 ▼9.24
Media Library /wp-admin/upload.php3.24 ▲0.0037.08 ▼7.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for loading-lazy
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.092.27 ▲0.4943.73 ▲4.68
Dashboard /wp-admin2,198 ▲245.63 ▲0.0686.20 ▼5.6340.57 ▲0.81
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0140.96 ▲4.8737.41 ▼0.95
Add New Post /wp-admin/post-new.php1,545 ▲1923.30 ▼0.29681.92 ▼14.5265.20 ▲15.04
Media Library /wp-admin/upload.php1,394 ▼64.31 ▲0.1399.50 ▼12.3148.19 ▼2.33

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 | 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/loading-lazy/loading-lazy.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
2 plugin tags: comments, spam

loading-lazy/loading-lazy.php Passed 13 tests

This is the main PHP file of "loading-lazy" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
87 characters long description:
When adding media on the post screen, automatically add loading = "lazy" to the img tag

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11106

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
No PNG images were found in this plugin