10% nextcellent-gallery-nextgen-legacy

Code Review | NextCellent Gallery - NextGEN Legacy

WordPress plugin NextCellent Gallery - NextGEN Legacy scored 10% from 54 tests.

About plugin

  • Plugin page: nextcellent-galle...
  • Plugin version: 1.9.35
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 5.9.2
  • First release: Sep 11, 2013
  • Latest release: Oct 16, 2017
  • Number of updates: 52
  • Update frequency: every 28.8 days
  • Top authors: WPReady (100%)

Code review

54 tests

User reviews

97 reviews

Install metrics

10,000+ active / 286,917 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/nextcellent-gallery-nextgen-legacy/widgets/class-ngg-slideshow-widget.php+175
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼346.81ms] Passed 4 tests

Server-side resources used by NextCellent Gallery - NextGEN Legacy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.40 ▼1.128.08 ▼47.44
Dashboard /wp-admin2.42 ▼0.997.70 ▼27.14
Posts /wp-admin/edit.php2.42 ▼1.226.88 ▼32.77
Add New Post /wp-admin/post-new.php2.42 ▼4.557.21 ▼1,279.87
Media Library /wp-admin/upload.php2.42 ▼0.887.30 ▼17.95
Overview /wp-admin/admin.php?page=nextcellent-gallery-nextgen-legacy2.426.78
Settings /wp-admin/admin.php?page=nggallery-options2.437.50
Style /wp-admin/admin.php?page=nggallery-style2.437.55
Roles /wp-admin/admin.php?page=nggallery-roles2.438.06
Albums /wp-admin/admin.php?page=nggallery-manage-album2.438.10
Tags /wp-admin/admin.php?page=nggallery-tags2.4311.62
Add Gallery / Images /wp-admin/admin.php?page=nggallery-add-gallery2.438.98
Galleries /wp-admin/admin.php?page=nggallery-manage2.436.74

Server storage [IO: ▲3.33MB] [DB: ▲0.24MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 177 new files
Database: 3 new tables, 5 new options
New tables
wp_ngg_pictures
wp_ngg_album
wp_ngg_gallery
New WordPress options
ngg_options
ngg_db_version
widget_ngg-mrssw
widget_slideshow
widget_ngg-images

Browser metrics Passed 4 tests

This is an overview of browser requirements for NextCellent Gallery - NextGEN Legacy
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,982 ▲23816.72 ▲1.0910.40 ▲4.332.38 ▲0.46
Dashboard /wp-admin2,961 ▲1076.12 ▼0.06115.28 ▼17.05152.87 ▼1.88
Posts /wp-admin/edit.php2,756 ▲653.23 ▼0.0062.65 ▼1.85147.85 ▲4.65
Add New Post /wp-admin/post-new.php1,754 ▲9322.32 ▲6.79401.42 ▼16.07156.45 ▲4.93
Media Library /wp-admin/upload.php1,771 ▲735.54 ▲0.08137.41 ▼10.94184.15 ▼1.50
Overview /wp-admin/admin.php?page=nextcellent-gallery-nextgen-legacy2,0893.4376.02140.45
Settings /wp-admin/admin.php?page=nggallery-options3,7833.9093.47159.11
Style /wp-admin/admin.php?page=nggallery-style1,2882.4154.38127.47
Roles /wp-admin/admin.php?page=nggallery-roles1,5312.3954.23150.50
Albums /wp-admin/admin.php?page=nggallery-manage-album1,3123.5271.72101.85
Tags /wp-admin/admin.php?page=nggallery-tags1,4402.4952.33127.46
Add Gallery / Images /wp-admin/admin.php?page=nggallery-add-gallery1,4183.3670.34140.86
Galleries /wp-admin/admin.php?page=nggallery-manage1,8843.2777.4296.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/nextcellent-gallery-nextgen-legacy/widgets/class-ngg-slideshow-widget.php+175
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 3 options in the database
    • widget_ngg-images
    • widget_ngg-mrssw
    • widget_slideshow

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nggallery-manage
    • > Deprecated in wp-content/plugins/nextcellent-gallery-nextgen-legacy/widgets/class-ngg-gallery-widget.php+252
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=nggallery-options
    • > Notice in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/class-ngg-options.php+672
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nggallery-options
    • > Notice in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/class-ngg-options.php+685
    Trying to get property 'pid' of non-object
    • > GET request to /wp-admin/admin.php?page=nggallery-options
    • > Notice in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/class-ngg-options.php+685
    Trying to get property 'alttext' of non-object
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nggallery-style
    • > Notice in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/class-ngg-style.php+73
    Undefined offset: 1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nggallery-manage
    • > Deprecated in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/functions.php+921
    Array and string offset access syntax with curly braces is deprecated

SRP 0% 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
  • 16× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/gallery.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/functions.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/singlepic.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/gallery-carousel.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/tinymce/window.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/album-extend.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/imagebrowser-exif.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/xml/json.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/imagebrowser-caption.php
    • > /wp-content/plugins/nextcellent-gallery-nextgen-legacy/view/imagebrowser.php
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'NGGALLERY_ABSPATH/admin/interface-ngg-displayable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/manage/class-ngg-manager.php on line 3
    • > PHP Warning
      Use of undefined constant NGGALLERY_ABSPATH - assumed 'NGGALLERY_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/manage/class-ngg-manager.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'nggGallery' not found in wp-content/plugins/nextcellent-gallery-nextgen-legacy/nggshow.php:3
    • > PHP Warning
      Use of undefined constant NGGALLERY_ABSPATH - assumed 'NGGALLERY_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/manage/class-ngg-manager.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/tinymce/tinymce.php:30
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/manage/class-ngg-gallery-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nextcellent-gallery-nextgen-legacy/widgets/class-ngg-media-rss-widget.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/manage/class-ngg-gallery-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nextcellent-gallery-nextgen-legacy/lib/xmlrpc.php:17
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/nextcellent-gallery-nextgen-legacy/admin/manage/class-ngg-gallery-list-table.php on line 4

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (Screenshot - Admin Area), #2 (Screenshot - Album Selection), #3 (Screenshot - Shutter Effect), #4 (Screenshot - Watermark function), #5 (Screenshot - Flexible template layout), #6 (Screenshot - Shows Exif data)
You can look at the official readme.txt

nextcellent-gallery-nextgen-legacy/nggallery.php 92% from 13 tests

The entry point to "NextCellent Gallery - NextGEN Legacy" version 1.9.35 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nextcellent-gallery-nextgen-legacy.php" instead of "nggallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected44,265 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
PO File87,69712,20016,561
PHP623,3494,83513,685
JavaScript211,9291,9757,706
CSS181,3023066,230
SVG70783

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity35.33
▷ Minimum class complexity1.00
▷ Maximum class complexity202.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes45
▷ Abstract classes36.67%
▷ Concrete classes4293.33%
▷ Final classes00.00%
Methods428
▷ Static methods11627.10%
▷ Public methods35182.01%
▷ Protected methods276.31%
▷ Private methods5011.68%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1184.62%
▷ Class constants215.38%
▷ Public constants2100.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
25 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
admin/css/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
admin/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
admin/images/nextgen_32_color.png1.08KB1.00KB▼ 7.67%