68% logicrays-easy-responsive-gallery-with-slider

Code Review | Logicrays Easy Responsive Gallery with Slider

WordPress plugin Logicrays Easy Responsive Gallery with Slider scored68%from 54 tests.

About plugin

  • Plugin page: logicrays-easy-re...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.6
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Jan 1, 2021
  • Number of updates: 7
  • Update frequency: every 146.3 days
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.54MB] [CPU: ▼54.56ms] Passed 4 tests

A check of server-side resources used by Logicrays Easy Responsive Gallery with Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.97 ▼4.75
Dashboard /wp-admin2.42 ▼0.9311.75 ▼52.16
Posts /wp-admin/edit.php2.42 ▼0.9411.36 ▼41.40
Add New Post /wp-admin/post-new.php2.42 ▼3.4711.97 ▼97.19
Media Library /wp-admin/upload.php2.42 ▼0.819.66 ▼27.48
All Galleries /wp-admin/edit.php?post_type=lergs_gallery2.4211.89
Add New Gallery /wp-admin/post-new.php?post_type=lergs_gallery2.4212.27
Settings /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page2.4211.66

Server storage [IO: ▲0.84MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Logicrays Easy Responsive Gallery with Slider: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲20414.02 ▼0.3312.58 ▲10.9245.33 ▼0.39
Dashboard /wp-admin2,254 ▲775.85 ▲0.2699.18 ▲6.5644.04 ▲0.91
Posts /wp-admin/edit.php2,181 ▲812.29 ▲0.3238.86 ▼1.4235.29 ▼2.24
Add New Post /wp-admin/post-new.php1,581 ▲4623.09 ▲4.85684.94 ▲72.2137.88 ▼21.98
Media Library /wp-admin/upload.php1,462 ▲624.42 ▲0.26109.87 ▲12.6350.07 ▲7.20
All Galleries /wp-admin/edit.php?post_type=lergs_gallery1,1642.4842.8933.85
Add New Gallery /wp-admin/post-new.php?post_type=lergs_gallery1,7463.7666.6634.66
Settings /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page1,2412.2946.3028.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/includes/class-lergs.php+69
    Use of undefined constant lergs - assumed 'lergs' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 96 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page
    • > Warning in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/includes/class-lergs.php+317
    Use of undefined constant lergs - assumed 'lergs' (this will throw an Error in a future version of PHP)
  • 96 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page
    • > Warning in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/includes/class-lergs.php+317
    Use of undefined constant responsive - assumed 'responsive' (this will throw an Error in a future version of PHP)
  • 288 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page
    • > Warning in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/includes/class-lergs.php+317
    A non-numeric value encountered
  • 96 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page
    • > Warning in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/includes/class-lergs.php+317
    Use of undefined constant gallery - assumed 'gallery' (this will throw an Error in a future version of PHP)
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lergs_gallery&page=lergs-setting-page
    • > Notice in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/lergs-responsive-gallery.php+144
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 3× 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/logicrays-easy-responsive-gallery-with-slider/includes/class-lergs.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/lergs-responsive-gallery.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/logicrays-easy-responsive-gallery-with-slider/includes/lergs-responsive-gallery-shortcode.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Stable tag: Not defined
The official readme.txt might help

logicrays-easy-responsive-gallery-with-slider/lergs-responsive-gallery.php 92% from 13 tests

The main PHP file in "Logicrays Easy Responsive Gallery with Slider" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("logicrays-easy-responsive-gallery-with-slider.php" instead of "lergs-responsive-gallery.php")

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
No dangerous file extensions were detected1,701 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP33527688
SVG100504
CSS8119363
JavaScript5326146

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fencybox/images/Photos-icon.png1.56KB1.30KB▼ 16.67%
images/Photos-icon.png1.56KB1.30KB▼ 16.67%
fencybox/images/Close-icon.png18.37KB8.39KB▼ 54.31%
images/Close-icon.png18.37KB8.39KB▼ 54.31%