78% import-to-photo-gallery-from-nextgen-gallery

Code Review | Import to Photo Gallery from NextGen gallery

WordPress plugin Import to Photo Gallery from NextGen gallery scored78%from 54 tests.

About plugin

  • Plugin page: import-to-photo-g...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9
  • WordPress version: 6.3.1
  • First release: Jul 24, 2015
  • Latest release: Oct 25, 2018
  • Number of updates: 25
  • Update frequency: every 47.6 days
  • Top authors: webdorado (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /37,483 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.81ms] Passed 4 tests

Server-side resources used by Import to Photo Gallery from NextGen gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0137.95 ▼6.40
Dashboard /wp-admin3.36 ▲0.0149.04 ▼2.20
Posts /wp-admin/edit.php3.41 ▲0.0146.27 ▼2.60
Add New Post /wp-admin/post-new.php5.94 ▲0.0188.97 ▼15.82
Media Library /wp-admin/upload.php3.28 ▲0.0133.98 ▼2.40

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Import to Photo Gallery from NextGen gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.34 ▼0.011.64 ▼0.2641.51 ▲0.30
Dashboard /wp-admin2,213 ▲335.57 ▼0.0190.53 ▼1.1372.94 ▲28.63
Posts /wp-admin/edit.php2,118 ▲181.98 ▼0.0239.46 ▲4.1336.06 ▼2.66
Add New Post /wp-admin/post-new.php1,555 ▲1923.13 ▲4.84743.87 ▲114.8160.65 ▼15.07
Media Library /wp-admin/upload.php1,415 ▲154.18 ▼0.00102.31 ▲6.9270.58 ▲27.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/import-to-photo-gallery-from-nextgen-gallery/admin/views/PGIViewImport_pgi.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/import-to-photo-gallery-from-nextgen-gallery/ngitopg.php:12
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/import-to-photo-gallery-from-nextgen-gallery/ngitopg.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: nextgen gallery, export, import, photo gallery, gallery

import-to-photo-gallery-from-nextgen-gallery/ngitopg.php 92% from 13 tests

Analyzing the main PHP file in "Import to Photo Gallery from NextGen gallery" version 1.0.5
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("import-to-photo-gallery-from-nextgen-gallery.php" instead of "ngitopg.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
No dangerous file extensions were detected665 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42256573
JavaScript14256
CSS16036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.33
▷ Minimum class complexity9.00
▷ Maximum class complexity53.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/import-icon.png1.03KB0.91KB▼ 11.90%
images/icon-16x16.png1.51KB0.64KB▼ 57.58%