94% demomentsomtres-wc-lazy

Code Review | DeMomentSomTres Lazy Load for WP Canvas - Gallery

WordPress plugin DeMomentSomTres Lazy Load for WP Canvas - Gallery scored 94% from 54 tests.

About plugin

  • Plugin page: demomentsomtres-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6
  • WordPress version: 5.8.1
  • First release: Feb 2, 2015
  • Latest release: Mar 23, 2016
  • Number of updates: 3
  • Update frequency: every 168.3 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,107 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by DeMomentSomTres Lazy Load for WP Canvas - Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.99 ▲9.99
Dashboard /wp-admin3.07 ▲0.0154.31 ▲7.98
Posts /wp-admin/edit.php3.12 ▲0.0147.65 ▲2.97
Add New Post /wp-admin/post-new.php5.43 ▼0.01112.95 ▼550.63
Media Library /wp-admin/upload.php3.01 ▲0.0134.62 ▼2.65

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by DeMomentSomTres Lazy Load for WP Canvas - Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.83 ▼0.077.55 ▼1.9353.35 ▼3.89
Dashboard /wp-admin2,988 ▲575.90 ▼0.33141.68 ▼5.97111.69 ▼1.81
Posts /wp-admin/edit.php2,759 ▲202.81 ▼0.0179.05 ▲7.9097.21 ▼1.62
Add New Post /wp-admin/post-new.php1,626 ▼5721.39 ▲2.82299.68 ▼92.74111.75 ▼2.23
Media Library /wp-admin/upload.php1,825 ▲185.02 ▼0.01155.95 ▲1.90123.58 ▼16.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/demomentsomtres-wc-lazy/demomentsomtres-wc-lazy.php on line 15
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/demomentsomtres-wc-lazy/demomentsomtres-wc-lazy.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/demomentsomtres-wc-lazy/demomentsomtres-wc-lazy.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: carousel gallery, masonry gallery, carousel, gallery slider, slider...

demomentsomtres-wc-lazy/demomentsomtres-wc-lazy.php Passed 13 tests

The main PHP file in "DeMomentSomTres Lazy Load for WP Canvas - Gallery" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
52 characters long description:
Adds BJ Lazy Load compatibility to WP Canvas Gallery

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin201 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13928136
PHP1141565

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin