72% simple-lyteload

Code Review | Simple lyteload

WordPress plugin Simple lyteload scored72%from 54 tests.

About plugin

  • Plugin page: simple-lyteload
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.0
  • WordPress version: 6.3.1
  • First release: Apr 28, 2013
  • Latest release: Dec 14, 2016
  • Number of updates: 7
  • Update frequency: every 189.4 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,093 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.63ms] Passed 4 tests

A check of server-side resources used by Simple lyteload
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.29 ▼4.28
Dashboard /wp-admin3.45 ▲0.1052.21 ▼18.07
Posts /wp-admin/edit.php3.56 ▲0.2155.53 ▲4.41
Add New Post /wp-admin/post-new.php6.03 ▲0.1486.71 ▼14.74
Media Library /wp-admin/upload.php3.37 ▲0.1438.07 ▼1.41
LyteLoad Settings /wp-admin/options-general.php?page=lyteload_panel3.3232.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple lyteload
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.84 ▼0.558.82 ▲6.8837.35 ▼5.69
Dashboard /wp-admin2,202 ▲225.64 ▼0.0597.27 ▼2.6343.68 ▼2.26
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0138.87 ▲0.6735.29 ▼3.61
Add New Post /wp-admin/post-new.php1,529 ▼1117.61 ▼0.40638.20 ▲3.6554.48 ▼14.05
Media Library /wp-admin/upload.php1,407 ▲104.18 ▼0.0998.47 ▼1.9343.65 ▲0.56
LyteLoad Settings /wp-admin/options-general.php?page=lyteload_panel1,3513.8861.4484.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=lyteload_panel
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=lyteload_panel
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-lyteload/plugin.php:106
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePanel' not found in wp-content/plugins/simple-lyteload/classes/lazy_Panel_Class.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=lyteload_panel
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at Object.hooks (/wp-admin/options-general.php?page=lyteload_panel:247:61)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=lyteload_panel:397:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=lyteload_panel
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: lyteload, lazy load, lazyload, lazy images

simple-lyteload/plugin.php 92% from 13 tests

The main PHP script in "Simple lyteload" version 0.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-lyteload.php" instead of "plugin.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
Good job! No executable or dangerous file extensions detected850 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5113672690
JavaScript23547160

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity27.00
▷ Minimum class complexity10.00
▷ Maximum class complexity50.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods47
▷ Static methods00.00%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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