80% modula-nextgen-migrator

Code Review | Migrate away from NextGEN Gallery

WordPress plugin Migrate away from NextGEN Gallery scored80%from 54 tests.

About plugin

  • Plugin page: modula-nextgen-mi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 10
  • Update frequency: every 65.1 days
  • Top authors: raldea89 (70%)wpchill (40%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,787 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.87MB] [CPU: ▼53.78ms] Passed 4 tests

A check of server-side resources used by Migrate away from NextGEN Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.26 ▼2.49
Dashboard /wp-admin2.09 ▼1.267.01 ▼50.99
Posts /wp-admin/edit.php2.09 ▼1.275.40 ▼41.40
Add New Post /wp-admin/post-new.php2.09 ▼3.807.43 ▼92.61
Media Library /wp-admin/upload.php2.09 ▼1.146.10 ▼30.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Migrate away from NextGEN Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.55 ▲0.201.79 ▲0.3443.40 ▲3.31
Dashboard /wp-admin2,201 ▲245.50 ▼0.1181.08 ▼4.6839.88 ▼4.65
Posts /wp-admin/edit.php2,109 ▲91.95 ▼0.1635.53 ▼0.5540.82 ▲5.54
Add New Post /wp-admin/post-new.php1,536 ▲1023.22 ▲0.04622.72 ▼139.2947.65 ▼18.87
Media Library /wp-admin/upload.php1,412 ▲154.17 ▲0.0397.69 ▼20.4048.10 ▲1.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: gallery migrator, migrate to modula, nextgen gallery migrator, migrate from nextgen gallery

modula-nextgen-migrator/migrate-away-from-nextgen.php 92% from 13 tests

The main PHP file in "Migrate away from NextGEN Gallery" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("modula-nextgen-migrator.php" instead of "migrate-away-from-nextgen.php")

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 detected443 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3158223376
PO File1131654
CSS12013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity31.50
▷ Minimum class complexity10.00
▷ Maximum class complexity53.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods627.27%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin