84% at-lazy-loader

Code Review | AT Lazy Loader

WordPress plugin AT Lazy Loader scored84%from 54 tests.

About plugin

  • Plugin page: at-lazy-loader
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 12, 2019
  • Latest release: Aug 24, 2019
  • Number of updates: 30
  • Update frequency: every 0.6 days
  • Top authors: asentechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 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 gracefully, with no errors

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

Analyzing server-side resources used by AT Lazy Loader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.05688.95 ▲643.45
Dashboard /wp-admin3.34 ▼0.0149.05 ▼16.69
Posts /wp-admin/edit.php3.45 ▲0.0953.26 ▲0.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.10 ▼6.57
Media Library /wp-admin/upload.php3.26 ▲0.0337.41 ▼0.48
Lazy Loader /wp-admin/options-general.php?page=at_lazy_loader_menu_slug3.2226.68

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AT Lazy Loader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,785 ▲2414.36 ▼0.292.69 ▲0.9034.60 ▼10.26
Dashboard /wp-admin2,202 ▲285.60 ▼0.0798.45 ▲2.1744.91 ▲2.67
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0839.53 ▲3.4534.63 ▼1.62
Add New Post /wp-admin/post-new.php1,538 ▲1218.29 ▼4.89618.65 ▼75.8974.79 ▲22.85
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.10104.04 ▼13.4741.83 ▼3.35
Lazy Loader /wp-admin/options-general.php?page=at_lazy_loader_menu_slug7952.0128.0031.14

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • at_lazy_loader_image_placeholder
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just 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 add_action() in wp-content/plugins/at-lazy-loader/at-lazy-loader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: lazy loading

at-lazy-loader/at-lazy-loader.php Passed 13 tests

The principal PHP file in "AT Lazy Loader" v. 1.0.0 is loaded by WordPress automatically on each request
39 characters long description:
Lazy loads assets into a Wordpress Site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected7 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1076
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1386.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
blank.png1.24KB0.12KB▼ 90.05%