83% nano-plugin-manager

Code Review | Nano Plugin Manager

WordPress plugin Nano Plugin Manager scored83%from 54 tests.

About plugin

  • Plugin page: nano-plugin-manager
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4
  • WordPress version: 6.3.1
  • First release: Jan 9, 2012
  • Latest release: Sep 18, 2012
  • Number of updates: 16
  • Update frequency: every 15.8 days
  • Top authors: gab.ro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /4,038 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.09MB] [CPU: ▼4.99ms] Passed 4 tests

A check of server-side resources used by Nano Plugin Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0952.21 ▲8.19
Dashboard /wp-admin3.40 ▲0.0951.70 ▼1.80
Posts /wp-admin/edit.php3.51 ▲0.1651.44 ▲1.98
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.63 ▼19.08
Media Library /wp-admin/upload.php3.32 ▲0.0938.48 ▼1.06
Add / Edit /wp-admin/admin.php?page=nano-plugin-editor3.2937.95
Nano Plugins /wp-admin/admin.php?page=nano-plugins3.2939.58
Import /wp-admin/admin.php?page=nano-plugin-importer3.2933.97

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
npm_activated

Browser metrics Passed 4 tests

A check of browser resources used by Nano Plugin Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.34 ▼0.191.74 ▼0.7843.71 ▲0.79
Dashboard /wp-admin2,224 ▲445.58 ▲0.0184.95 ▼14.2280.82 ▲39.61
Posts /wp-admin/edit.php2,126 ▲261.98 ▲0.0137.78 ▼0.7933.81 ▲0.22
Add New Post /wp-admin/post-new.php1,562 ▲3623.00 ▼0.74798.14 ▲147.2760.75 ▲10.95
Media Library /wp-admin/upload.php1,429 ▲294.14 ▼0.03101.92 ▼11.4968.16 ▲26.28
Add / Edit /wp-admin/admin.php?page=nano-plugin-editor1,1532.0229.0333.65
Nano Plugins /wp-admin/admin.php?page=nano-plugins8882.1725.8926.87
Import /wp-admin/admin.php?page=nano-plugin-importer8002.0324.7530.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • npm_activated
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nano-plugin-manager/npm.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === nano-plugin-manager === )
  • Screenshots: Add images for these screenshots: #1 (Nano plugin listing), #2 (The edit screen)
Please take inspiration from this readme.txt

nano-plugin-manager/npm.php 92% from 13 tests

"Nano Plugin Manager" version 0.9.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nano-plugin-manager.php" instead of "npm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,313 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62011883,527
PHP1612191298
HTML5320293
CSS2174114
PO File1355078
XML3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png28.01KB9.98KB▼ 64.37%
includes/npm16.png0.75KB0.59KB▼ 20.89%
screenshot-1.png32.88KB13.30KB▼ 59.54%
includes/npm32.png3.33KB2.21KB▼ 33.52%