10% nextgen-gallery-geo

Code Review | Geo2 Maps Add-on for NextGEN Gallery

WordPress plugin Geo2 Maps Add-on for NextGEN Gallery scored10%from 54 tests.

About plugin

  • Plugin page: nextgen-gallery-geo
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 29, 2012
  • Latest release: Nov 28, 2023
  • Number of updates: 183
  • Update frequency: every 23.4 days
  • Top authors: frest.de (56.83%)pablo2 (43.72%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active /21,228 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
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/nextgen-gallery-geo/functions.php+1196
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.21MB] [CPU: ▼30.74ms] Passed 4 tests

Server-side resources used by Geo2 Maps Add-on for NextGEN Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5252.35 ▲12.14
Dashboard /wp-admin3.74 ▲0.4027.20 ▼38.59
Posts /wp-admin/edit.php3.74 ▲0.3829.73 ▼14.89
Add New Post /wp-admin/post-new.php3.74 ▼2.1527.14 ▼66.07
Media Library /wp-admin/upload.php3.74 ▲0.5129.30 ▼3.41
Geo2 Maps /wp-admin/admin.php?page=nextgen-gallery-geo/administration.php3.7427.10

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
plugin_geo2_maps_options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Geo2 Maps Add-on for NextGEN Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲25818.69 ▲4.3522.92 ▲21.1241.84 ▼0.59
Dashboard /wp-admin2,234 ▲566.92 ▲1.24113.76 ▲2.0344.74 ▲1.17
Posts /wp-admin/edit.php2,142 ▲424.15 ▲2.1559.45 ▲22.8757.40 ▲19.35
Add New Post /wp-admin/post-new.php1,718 ▲19225.19 ▲1.95649.10 ▼12.8534.21 ▼24.31
Media Library /wp-admin/upload.php1,436 ▲396.38 ▲2.18118.60 ▲19.4446.21 ▲4.00
Geo2 Maps /wp-admin/admin.php?page=nextgen-gallery-geo/administration.php6,0076.11178.8657.35

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/nextgen-gallery-geo/administration.php+138
    Use of undefined constant NGGFOLDER - assumed 'NGGFOLDER' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=nextgen-gallery-geo/administration.php
    • > Warning in wp-content/plugins/nextgen-gallery-geo/administration.php+138
    Use of undefined constant NGGFOLDER - assumed 'NGGFOLDER' (this will throw an Error in a future version of PHP)

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 87% 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
These attributes need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

nextgen-gallery-geo/plugin.php 85% from 13 tests

The main PHP script in "Geo2 Maps Add-on for NextGEN Gallery" version 2.0.8 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("nextgen-gallery-geo.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin12,087 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP114541,3734,906
JavaScript141,3088594,585
CSS82681241,585
PO File13474511,011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions61
▷ Named functions5590.16%
▷ Anonymous functions69.84%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin