68% nextgen-gallery-search-galleries

Code Review | NextGEN Gallery Search

WordPress plugin NextGEN Gallery Search scored 68% from 54 tests.

About plugin

  • Plugin page: nextgen-gallery-s...
  • Plugin version: 2.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.2-4.2.4
  • WordPress version: 6.3.1
  • First release: Nov 20, 2013
  • Latest release: Aug 10, 2015
  • Number of updates: 44
  • Update frequency: every 14.4 days
  • Top authors: Koelio (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 15,750 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼32.95ms] Passed 4 tests

A check of server-side resources used by NextGEN Gallery Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0142.58 ▲1.83
Dashboard /wp-admin2.99 ▼0.3121.56 ▼28.12
Posts /wp-admin/edit.php2.99 ▼0.3623.59 ▼24.19
Add New Post /wp-admin/post-new.php2.99 ▼2.8922.00 ▼65.05
Media Library /wp-admin/upload.php2.99 ▼0.2320.91 ▼14.42
Search Galleries /wp-admin/admin.php?page=ngg-search2.9922.72

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for NextGEN Gallery Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.53 ▼1.031.73 ▼0.1944.12 ▼6.53
Dashboard /wp-admin2,221 ▲334.93 ▲0.06100.93 ▼15.0772.03 ▲27.75
Posts /wp-admin/edit.php2,104 ▲152.03 ▲0.0538.33 ▲2.3234.57 ▼1.97
Add New Post /wp-admin/post-new.php1,536 ▲323.18 ▲0.16718.39 ▲40.5459.62 ▲7.76
Media Library /wp-admin/upload.php1,403 ▲214.16 ▼0.03108.55 ▲8.7946.43 ▲3.79
Search Galleries /wp-admin/admin.php?page=ngg-search8682.1925.1938.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/nextgen-gallery-search-galleries/ngg-search.php+39
    Use of undefined constant wp_ngg_search - assumed 'wp_ngg_search' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=ngg-search
    • > Warning in wp-content/plugins/nextgen-gallery-search-galleries/ngg-search.php+39
    Use of undefined constant wp_ngg_search - assumed 'wp_ngg_search' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ngg-search
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/nextgen-gallery): failed to open dir: No such file or directory
    • > GET request to /wp-admin/admin.php?page=ngg-search
    • > Notice in wp-content/plugins/nextgen-gallery-search-galleries/ngg-search.php+98
    Undefined index: find
    • > GET request to /wp-admin/admin.php?page=ngg-search
    • > Notice in wp-content/plugins/nextgen-gallery-search-galleries/ngg-search.php+139
    Undefined variable: string

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nextgen-gallery-search-galleries/ngg-search.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (NextGEN Gallery - Search Galleries page.) image missing
The official readme.txt might help

nextgen-gallery-search-galleries/ngg-search.php 85% from 13 tests

"NextGEN Gallery Search" version 2.12's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 241 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nextgen-gallery-search-galleries.php" instead of "ngg-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin119 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13354119

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.34
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.44KB0.38KB▼ 13.90%