84% magic-robots-txt

Code Review | Magic robots.txt

WordPress plugin Magic robots.txt scored84%from 54 tests.

About plugin

  • Plugin page: magic-robots-txt
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Sep 18, 2023
  • Number of updates: 12
  • Update frequency: every 25.3 days
  • Top authors: ABCdatos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,416 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.19MB] [CPU: ▼3.44ms] Passed 4 tests

A check of server-side resources used by Magic robots.txt
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.23 ▼2.77
Dashboard /wp-admin3.55 ▲0.2154.01 ▼9.15
Posts /wp-admin/edit.php3.66 ▲0.3150.23 ▲2.94
Add New Post /wp-admin/post-new.php6.13 ▲0.2486.28 ▼4.77
Media Library /wp-admin/upload.php3.47 ▲0.2440.44 ▲7.53

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Magic robots.txt
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22013.32 ▼1.341.53 ▼0.3933.36 ▼8.32
Dashboard /wp-admin2,372 ▲1815.86 ▲0.77103.25 ▼12.9083.93 ▲41.28
Posts /wp-admin/edit.php2,255 ▲1662.03 ▲0.0639.57 ▲2.1344.91 ▲10.31
Add New Post /wp-admin/post-new.php1,806 ▲28622.48 ▼0.61624.96 ▼42.4044.32 ▼12.21
Media Library /wp-admin/upload.php1,558 ▲1704.21 ▲0.03101.86 ▼0.2274.14 ▲32.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/includes/robots.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/uninstall.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/includes/mapasitio.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/admin/archivo.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/includes/configuracion.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/lista_opciones.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/magic-robots-txt.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/admin/opciones.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/magic-robots-txt/includes/publicidad.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: robots, seo, bots, google, robotstxt

magic-robots-txt/magic-robots-txt.php 92% from 13 tests

This is the main PHP file of "Magic robots.txt" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,333 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP91515361,247
SVG10186

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions93
▷ Named functions93100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin