83% ketno-lazy-page-loader

Code Review | Kento Lazy Page Loader

WordPress plugin Kento Lazy Page Loader scored83%from 54 tests.

About plugin

  • Plugin page: ketno-lazy-page-l...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2014
  • Latest release: Jun 9, 2015
  • Number of updates: 22
  • Update frequency: every 9.5 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,873 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.49ms] Passed 4 tests

This is a short check of server-side resources used by Kento Lazy Page Loader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0633.76 ▼8.27
Dashboard /wp-admin3.33 ▲0.0247.91 ▼4.23
Posts /wp-admin/edit.php3.38 ▲0.0249.79 ▲4.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.87 ▼11.88
Media Library /wp-admin/upload.php3.25 ▲0.0234.78 ▲2.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Kento Lazy Page Loader
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20914.16 ▼0.137.65 ▲5.1345.49 ▼2.96
Dashboard /wp-admin2,235 ▲475.11 ▼0.75111.82 ▼6.0138.51 ▼5.48
Posts /wp-admin/edit.php2,120 ▲312.29 ▲0.2835.47 ▼1.8231.34 ▼1.04
Add New Post /wp-admin/post-new.php1,535 ▼323.10 ▲0.22661.60 ▲12.4034.65 ▼24.18
Media Library /wp-admin/upload.php1,414 ▲264.40 ▲0.2299.45 ▲2.2841.59 ▼1.10

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ketno-lazy-page-loader/lazy-loader.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ketno-lazy-page-loader/lazy-loader.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ketno-lazy-page-loader/loader-admin.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "Kentothemes.com"
  • Screenshots: Add images for these screenshots: #1 (Admin Panel), #2 (Website Preview), #3 (Website Preview-1)
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

ketno-lazy-page-loader/lazy-loader.php 92% from 13 tests

The entry point to "Kento Lazy Page Loader" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ketno-lazy-page-loader.php" instead of "lazy-loader.php")

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
No dangerous file extensions were detected342 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28527255
JavaScript141354
CSS13033

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.14MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-2.png21.36KB0.00KB▼ 100.00%
(invalid) screenshot-3.png105.15KB0.00KB▼ 100.00%
(invalid) screenshot-1.png18.15KB0.00KB▼ 100.00%