84% devrama-image-lazyload

Code Review | Devrama Image Lazyload

WordPress plugin Devrama Image Lazyload scored84%from 54 tests.

About plugin

  • Plugin page: devrama-image-laz...
  • Plugin version: 0.9.34
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2014
  • Latest release: Mar 14, 2014
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: calmgracian (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.36MB] [CPU: ▼11.60ms] Passed 4 tests

Server-side resources used by Devrama Image Lazyload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.79 ▼38.26
Dashboard /wp-admin3.31 ▲0.0047.71 ▼0.00
Posts /wp-admin/edit.php3.36 ▲0.0049.00 ▼2.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.22 ▼5.81
Media Library /wp-admin/upload.php3.23 ▲0.0036.94 ▲0.28

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Devrama Image Lazyload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.45 ▼1.1810.25 ▲8.6842.93 ▲3.29
Dashboard /wp-admin2,198 ▲185.60 ▼0.0585.16 ▼12.2040.27 ▼2.68
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0835.06 ▼3.0031.23 ▼13.90
Add New Post /wp-admin/post-new.php1,526 ▼023.26 ▲0.39664.77 ▼5.4469.84 ▲14.41
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.02101.16 ▼5.0146.69 ▲1.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/devrama-image-lazyload/index.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'DevramaWordpressMVCInit' not found in wp-content/plugins/devrama-image-lazyload/app/default/controller.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/devrama-image-lazyload/config.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: lazyload, image, load

devrama-image-lazyload/index.php 92% from 13 tests

The primary PHP file in "Devrama Image Lazyload" version 0.9.34 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("devrama-image-lazyload.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin161 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44718128
CSS15328
JavaScript1085

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods321.43%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin