84% assistant-for-nextgen-gallery

Code Review | Assistant for NextGEN Gallery

WordPress plugin Assistant for NextGEN Gallery scored84%from 54 tests.

About plugin

  • Plugin page: assistant-for-nex...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2019
  • Latest release: Apr 28, 2019
  • Number of updates: 25
  • Update frequency: every 4.5 days
  • Top authors: 48hmorris (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,213 total downloads

Benchmarks

Plugin footprint 83% 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.15MB] [CPU: ▼5.22ms] Passed 4 tests

A check of server-side resources used by Assistant for NextGEN Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.24 ▼4.12
Dashboard /wp-admin3.45 ▲0.1550.13 ▼1.07
Posts /wp-admin/edit.php3.56 ▲0.2151.67 ▼1.57
Add New Post /wp-admin/post-new.php6.04 ▲0.1584.70 ▼12.38
Media Library /wp-admin/upload.php3.37 ▲0.1440.11 ▼2.80

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Assistant for NextGEN Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14714.86 ▲0.4722.74 ▲20.5344.71 ▲3.28
Dashboard /wp-admin2,195 ▲185.62 ▲0.0492.35 ▼1.9836.34 ▼4.17
Posts /wp-admin/edit.php2,097 ▼02.03 ▲0.0643.03 ▲3.2335.67 ▼1.79
Add New Post /wp-admin/post-new.php1,535 ▲718.14 ▼4.97661.54 ▲56.6163.81 ▲12.78
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.01105.07 ▲3.6844.13 ▲0.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/assistant-for-nextgen-gallery/nextgenassistant.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: nextgen gallery, image optimizer, desktop, uploads, image uploader...

assistant-for-nextgen-gallery/nextgenassistant.php 85% from 13 tests

"Assistant for NextGEN Gallery" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("assistant-for-nextgen-gallery.php" instead of "nextgenassistant.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,012 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1108511,012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions28
▷ Named functions2485.71%
▷ Anonymous functions414.29%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png15.59KB16.39KB0.00%
assets/icon-256x256.png47.83KB15.45KB▼ 67.70%
assets/icon-128x128.png16.20KB6.01KB▼ 62.91%