68% multisite-robotstxt-manager

Code Review | Multisite Robots.txt Manager

WordPress plugin Multisite Robots.txt Manager scored 68% from 54 tests.

About plugin

  • Plugin page: multisite-robotst...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4
  • WordPress version: 5.9.2
  • First release: Mar 14, 2012
  • Latest release: Apr 12, 2020
  • Number of updates: 54
  • Update frequency: every 54.7 days
  • Top authors: tribalNerd (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

800+ active / 51,304 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲4.60MB] [CPU: ▼279.62ms] Passed 4 tests

Analyzing server-side resources used by Multisite Robots.txt Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.44 ▲4.9271.12 ▲20.59
Dashboard /wp-admin8.46 ▲5.0554.06 ▲18.40
Posts /wp-admin/edit.php8.46 ▲4.8259.97 ▲21.46
Add New Post /wp-admin/post-new.php10.57 ▲3.60116.87 ▼1,175.87
Media Library /wp-admin/upload.php8.46 ▲5.1545.95 ▲18.41

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 235 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_accounts
fs_gdpr
fs_debug_mode

Browser metrics Passed 4 tests

A check of browser resources used by Multisite Robots.txt Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,778 ▲5516.20 ▲0.565.94 ▼0.602.24 ▲0.01
Dashboard /wp-admin2,903 ▲426.08 ▼0.11126.75 ▼9.98163.28 ▲5.88
Posts /wp-admin/edit.php2,703 ▲123.24 ▲0.0064.44 ▲0.86139.30 ▼2.95
Add New Post /wp-admin/post-new.php1,646 ▼1519.64 ▲3.55444.13 ▲43.14146.04 ▼18.23
Media Library /wp-admin/upload.php1,713 ▲185.54 ▲0.00151.06 ▲7.17190.11 ▲0.99

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
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_accounts
    • fs_gdpr
    • fs_active_plugins

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/ajax-loader.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/partials/network-activation.php:6
    • > PHP Warning
      Use of undefined constant MS_ROBOTSTXT_MANAGER_FILE - assumed 'MS_ROBOTSTXT_MANAGER_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/multisite-robotstxt-manager/sdk/msrtm-fs.php on line 12
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/multisite-robotstxt-manager/sdk/freemius/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

multisite-robotstxt-manager/multisite-robotstxt-manager.php Passed 13 tests

The principal PHP file in "Multisite Robots.txt Manager" v. 3.0.0 is loaded by WordPress automatically on each request
128 characters long description:
A Multisite Network Robots.txt Manager. Quickly manage your Network Websites robots.txt files from a single administration area.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected49,471 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1447,74017,43531,723
PO File137,5319,16116,474
CSS1300889
JavaScript33459194
Markdown1590191

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity61.91
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits2
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes1828.57%
Methods1,221
▷ Static methods18014.74%
▷ Public methods84969.53%
▷ Protected methods151.23%
▷ Private methods35729.24%
Functions95
▷ Named functions95100.00%
▷ Anonymous functions00.00%
Constants128
▷ Global constants10380.47%
▷ Class constants2519.53%
▷ Public constants25100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
sdk/freemius/assets/img/multisite-robotstxt-manager.png28.33KB4.20KB▼ 85.19%
sdk/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
sdk/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%