84% multipart-robotstxt-editor

Code Review | Multipart robots.txt editor

WordPress plugin Multipart robots.txt editor scored 84% from 54 tests.

About plugin

  • Plugin page: multipart-robotst...
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.2
  • WordPress version: 5.8.1
  • First release: Sep 14, 2014
  • Latest release: Feb 17, 2018
  • Number of updates: 11
  • Update frequency: every 113.8 days
  • Top authors: szepe.viktor (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active / 49,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼178.31ms] Passed 4 tests

An overview of server-side resources used by Multipart robots.txt editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0530.08 ▲8.63
Dashboard /wp-admin3.28 ▲0.2134.18 ▼3.82
Posts /wp-admin/edit.php3.33 ▲0.2231.87 ▲1.75
Add New Post /wp-admin/post-new.php5.58 ▲0.1468.90 ▼716.53
Media Library /wp-admin/upload.php3.16 ▲0.1628.81 ▲5.35
Multipart robots.txt /wp-admin/options-general.php?page=mp-robotstxt-page3.1321.97

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Multipart robots.txt editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲4416.00 ▼0.075.40 ▲0.1074.54 ▼3.93
Dashboard /wp-admin2,938 ▲426.00 ▼0.16115.27 ▼14.72167.28 ▼6.94
Posts /wp-admin/edit.php2,745 ▲53.23 ▲0.2062.83 ▼3.00139.66 ▼5.92
Add New Post /wp-admin/post-new.php3,738 ▲3418.41 ▼0.19430.91 ▼21.25160.27 ▼10.58
Media Library /wp-admin/upload.php1,754 ▲55.43 ▼0.15142.66 ▲1.53183.18 ▼5.72
Multipart robots.txt /wp-admin/options-general.php?page=mp-robotstxt-page1,2382.4056.60128.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin has failed uninstalling correctly, leaving 8 files (0.07MB) in the plugin directory
    • (new file) admin/sanitize-callbacks.php
    • (new file) admin/display-callbacks.php
    • (new file) mp-robotstxt.php
    • (new file) admin/voce-settings-api.php
    • (new file) readme.txt
    • (new file) includes/robotstxtparser.php
    • (new file) assets/badbots.txt
    • (new file) README.md

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > Break-in attempt detected
      mprtxt_direct_access /wp-content/plugins/multipart-robotstxt-editor/mp-robotstxt.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: editor, robots, seo, spiders, robotstxt...

multipart-robotstxt-editor/mp-robotstxt.php 92% from 13 tests

Analyzing the main PHP file in "Multipart robots.txt editor" version 0.4.0
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multipart-robotstxt-editor.php" instead of "mp-robotstxt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,356 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP52565931,297
Markdown121059

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity30.33
▷ Minimum class complexity5.00
▷ Maximum class complexity112.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods92
▷ Static methods77.61%
▷ Public methods4650.00%
▷ Protected methods2325.00%
▷ Private methods2325.00%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin