10% multisite-auditor

Code Review | Multisite Auditor

WordPress plugin Multisite Auditor scored 10% from 54 tests.

About plugin

  • Plugin page: multisite-auditor
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 5.8.1
  • First release: Feb 23, 2015
  • Latest release: Nov 7, 2017
  • Number of updates: 24
  • Update frequency: every 41.3 days
  • Top authors: alexfurr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 2,669 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/multisite-auditor/functions.php+98
    Uncaught Error: Call to undefined function switch_to_blog() in wp-content/plugins/multisite-auditor/functions.php:98
    Stack trace:
    #0 wp-content/plugins/multisite-auditor/functions.php(35): MSA_functions::getBlogInfo()
    #1 wp-includes/class-wp-hook.php(303): MSA_functions::MSA_detectPluginActivation()
    #2 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(725): do_action()

Server metrics [RAM: ▲0.01MB] [CPU: ▼163.13ms] Passed 4 tests

This is a short check of server-side resources used by Multisite Auditor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1350.06 ▲21.11
Dashboard /wp-admin3.07 ▲0.0147.32 ▼3.57
Posts /wp-admin/edit.php3.12 ▲0.0147.75 ▼5.84
Add New Post /wp-admin/post-new.php5.43 ▼0.01104.02 ▼642.34
Media Library /wp-admin/upload.php3.01 ▲0.0136.21 ▼0.78

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: 2 new tables, 1 new option
New tables
wp_MSA_themes
wp_MSA_plugins
New WordPress options
MSA-db-version

Browser metrics Passed 4 tests

Multisite Auditor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.89 ▲0.339.15 ▼1.8752.16 ▼2.53
Dashboard /wp-admin2,970 ▲365.92 ▼0.20154.36 ▲2.89134.55 ▲13.37
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0267.21 ▲2.7399.27 ▲3.46
Add New Post /wp-admin/post-new.php1,591 ▼9218.83 ▲0.63399.85 ▼6.65115.04 ▼0.78
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.04163.29 ▼3.07128.70 ▼3.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_MSA_themes
    • wp_MSA_plugins
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • MSA-db-version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/multisite-auditor/admin/empty.php
    • > /wp-content/plugins/multisite-auditor/admin/plugin_info.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MSA_functions' not found in wp-content/plugins/multisite-auditor/admin/theme_swap.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-auditor/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-auditor/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_themes() in wp-content/plugins/multisite-auditor/admin/themes.php:19
    • > PHP Notice
      Undefined index: oldTheme in wp-content/plugins/multisite-auditor/admin/theme_swap.php on line 4
    • > PHP Notice
      Undefined index: pluginName in wp-content/plugins/multisite-auditor/admin/plugin_info.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-auditor/pages.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/multisite-auditor/admin/theme_info.php:4
    • > PHP Notice
      Undefined index: themeName in wp-content/plugins/multisite-auditor/admin/theme_info.php on line 3
    • > PHP Notice
      Undefined index: newTheme in wp-content/plugins/multisite-auditor/admin/theme_swap.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: plugins, plugin management, admin, theme management, network...

multisite-auditor/multisite-auditor.php Passed 13 tests

This is the main PHP file of "Multisite Auditor" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
Cut down multisite theme and plugin auditor

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
There were no executable files found in this plugin1,370 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP134591011,216
CSS121084
JavaScript228170

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.25
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1843.90%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin