84% network-plugin-auditor

Code Review | Network Plugin Auditor

WordPress plugin Network Plugin Auditor scored 84% from 54 tests.

About plugin

  • Plugin page: network-plugin-au...
  • Plugin version: 1.10.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2012
  • Latest release: Oct 31, 2016
  • Number of updates: 39
  • Update frequency: every 43.8 days
  • Top authors: ksemel (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

80+ active / 37,323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.82ms] Passed 4 tests

Analyzing server-side resources used by Network Plugin Auditor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.69 ▼2.82
Dashboard /wp-admin3.39 ▲0.0947.76 ▼3.58
Posts /wp-admin/edit.php3.50 ▲0.1553.30 ▲3.33
Add New Post /wp-admin/post-new.php5.97 ▲0.0986.15 ▼10.61
Media Library /wp-admin/upload.php3.31 ▲0.0936.73 ▲1.75

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

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

Browser metrics Passed 4 tests

Network Plugin Auditor: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.67 ▼0.974.49 ▲2.6643.63 ▼2.45
Dashboard /wp-admin2,209 ▲354.85 ▲0.00100.38 ▼14.4537.35 ▼9.89
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0340.27 ▲0.8934.56 ▲1.01
Add New Post /wp-admin/post-new.php1,543 ▼123.52 ▲4.97676.14 ▲31.0356.14 ▼4.01
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.01104.47 ▲9.5846.63 ▲3.15

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/network-plugin-auditor/network-plugin-auditor.php:607

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin Active on the Network Plugins page), #2 (Plugin Active on the Network Sites page), #3 (Plugin Active on the Network Themes page)
You can take inspiration from this readme.txt

network-plugin-auditor/network-plugin-auditor.php 92% from 13 tests

"Network Plugin Auditor" version 1.10.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 258 characters long)

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
No dangerous file extensions were detected521 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP113279396
PO File23234125

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity91.00
▷ Minimum class complexity91.00
▷ Maximum class complexity91.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1252.17%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png63.56KB33.82KB▼ 46.78%
screenshot-2.png45.04KB19.06KB▼ 57.69%
screenshot-3.png67.50KB33.37KB▼ 50.56%