84% pqinternets-nextgen-database-analysis-and-clean-up-tool

Code Review | pqInternet's NextGEN Database Analysis and Clean-up Tool

WordPress plugin pqInternet's NextGEN Database Analysis and Clean-up Tool scored 84% from 54 tests.

About plugin

  • Plugin page: pqinternets-nextg...
  • Plugin version: 0.02
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2018
  • Latest release: Mar 13, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: fwblack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.31ms] Passed 4 tests

An overview of server-side resources used by pqInternet's NextGEN Database Analysis and Clean-up Tool
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.89 ▼2.82
Dashboard /wp-admin3.43 ▲0.1250.39 ▼5.83
Posts /wp-admin/edit.php3.48 ▲0.1258.42 ▲8.79
Add New Post /wp-admin/post-new.php6.01 ▲0.1298.67 ▼2.32
Media Library /wp-admin/upload.php3.35 ▲0.1239.15 ▲1.73
NextGen Gallery DB Clean /wp-admin/tools.php?page=pqNGDBCLean3.3335.49

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by pqInternet's NextGEN Database Analysis and Clean-up Tool
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲413.23 ▼1.191.75 ▼0.0838.74 ▼4.42
Dashboard /wp-admin2,210 ▲74.84 ▼1.01108.69 ▼1.8344.34 ▲1.63
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0339.23 ▼5.5134.88 ▼0.48
Add New Post /wp-admin/post-new.php1,536 ▼123.34 ▲0.09649.88 ▲1.8047.86 ▼12.70
Media Library /wp-admin/upload.php1,389 ▲44.23 ▲0.0598.81 ▼6.4941.15 ▼4.02
NextGen Gallery DB Clean /wp-admin/tools.php?page=pqNGDBCLean8272.0323.4944.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pqinternets-nextgen-database-analysis-and-clean-up-tool/pqNGDBClean.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: nextgen, ngg

pqinternets-nextgen-database-analysis-and-clean-up-tool/pqNGDBClean.php 85% from 13 tests

"pqInternet's NextGEN Database Analysis and Clean-up Tool" version 0.02's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pqinternets-nextgen-database-analysis-and-clean-up-tool.php" instead of "pqNGDBClean.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 264 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin610 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP114110518
JavaScript171692

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/Internet-Business-and-More-400x150.png37.21KB12.14KB▼ 67.38%