68% el-gallery

Code Review | EL-Gallery

WordPress plugin EL-Gallery scored68%from 54 tests.

About plugin

  • Plugin page: el-gallery
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2014
  • Latest release: Jan 28, 2017
  • Number of updates: 55
  • Update frequency: every 17.4 days
  • Top authors: Eric Lowry (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,348 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.88MB] [CPU: ▼56.32ms] Passed 4 tests

An overview of server-side resources used by EL-Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.26 ▼47.03
Dashboard /wp-admin2.12 ▼1.187.06 ▼41.09
Posts /wp-admin/edit.php2.12 ▼1.236.00 ▼41.68
Add New Post /wp-admin/post-new.php2.12 ▼3.767.08 ▼95.46
Media Library /wp-admin/upload.php2.12 ▼1.105.95 ▼31.29
EL-Gallery /wp-admin/themes.php?page=el-gallery2.136.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for EL-Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.60 ▼0.758.31 ▲6.4643.04 ▼0.02
Dashboard /wp-admin2,214 ▲294.85 ▼1.03104.08 ▼13.2440.17 ▼5.33
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0340.83 ▲2.3136.96 ▲1.16
Add New Post /wp-admin/post-new.php1,521 ▲823.12 ▲5.64685.91 ▲19.9557.04 ▼1.27
Media Library /wp-admin/upload.php1,399 ▲114.23 ▼0.1096.94 ▼6.6042.79 ▼3.64
EL-Gallery /wp-admin/themes.php?page=el-gallery1,0682.1027.7730.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the el-gallery_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the el-gallery_font_awsome handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > Notice in wp-content/plugins/el-gallery/el-gallery-admin.php+252
    Undefined variable: is_IE
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > Notice in wp-content/plugins/el-gallery/el-gallery-admin.php+252
    Undefined variable: is_safari
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=el-gallery
    • > Notice in wp-content/plugins/el-gallery/el-gallery-admin.php+252
    Undefined variable: is_iphone

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/el-gallery/el-gallery-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/el-gallery/el-gallery.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: jquery, css3, simple, wp, responsive...

el-gallery/el-gallery.php Passed 13 tests

"EL-Gallery" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
An extremely simplistic gallery replacement plugin.

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 detected3,626 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,701
PHP29456414
JavaScript24128285
CSS4661226

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin