84% delay-load-any-content

Code Review | Lazy Load Anything

WordPress plugin Lazy Load Anything scored84%from 54 tests.

About plugin

  • Plugin page: delay-load-any-co...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: May 6, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 13
  • Update frequency: every 35.6 days
  • Top authors: wpfixit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /694 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.39MB] [CPU: ▼3.19ms] Passed 4 tests

Server-side resources used by Lazy Load Anything
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4351.29 ▲12.19
Dashboard /wp-admin3.72 ▲0.4250.16 ▲3.34
Posts /wp-admin/edit.php3.77 ▲0.4245.28 ▼1.37
Add New Post /wp-admin/post-new.php6.24 ▲0.3581.89 ▼13.10
Media Library /wp-admin/upload.php3.58 ▲0.3535.34 ▼1.64

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazy Load Anything
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.60 ▼1.022.05 ▲0.3243.13 ▼0.27
Dashboard /wp-admin2,206 ▲154.87 ▲0.00101.42 ▼5.2638.63 ▼4.35
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0534.40 ▲0.2934.19 ▲0.38
Add New Post /wp-admin/post-new.php1,528 ▲1418.38 ▲0.95603.61 ▲10.7551.23 ▼7.91
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0197.27 ▲2.4542.40 ▲0.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 register_activation_hook() in wp-content/plugins/delay-load-any-content/vendor/activate.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
7 plugin tags: page speed, lazyload, fast site, lazy load, wordpress speed...

delay-load-any-content/idle-load.php 85% from 13 tests

The main file in "Lazy Load Anything" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the 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 ("delay-load-any-content.php" instead of "idle-load.php")
  • Description: The description should be shorter than 140 characters (currently 287 characters long)

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
No dangerous file extensions were detected2,283 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP153776622,142
JSON300109
Markdown317029
JavaScript1013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity69.67
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods125
▷ Static methods1915.20%
▷ Public methods10785.60%
▷ Protected methods1612.80%
▷ Private methods21.60%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants23
▷ Global constants23100.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
No PNG files were detected