90% wp-robots-txt

Code Review | WP Robots Txt

WordPress plugin WP Robots Txt scored90%from 54 tests.

About plugin

  • Plugin page: wp-robots-txt
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2012
  • Latest release: Sep 29, 2023
  • Number of updates: 8
  • Update frequency: every 528.1 days
  • Top authors: pattihis (62.5%)chrisguitarguy (50%)

Code review

54 tests

User reviews

17 reviews

Install metrics

30,000+ active /336,198 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.72ms] Passed 4 tests

Server-side resources used by WP Robots Txt
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.35 ▼5.14
Dashboard /wp-admin3.34 ▲0.0353.12 ▼1.93
Posts /wp-admin/edit.php3.39 ▲0.0352.55 ▲3.39
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.67 ▼11.19
Media Library /wp-admin/upload.php3.26 ▲0.0341.81 ▲3.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
robtxt_content
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Robots Txt
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.81 ▲0.181.66 ▼0.5549.52 ▲5.39
Dashboard /wp-admin2,224 ▲215.85 ▲0.9398.67 ▼19.2738.62 ▼3.76
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0237.70 ▲1.9731.71 ▼3.49
Add New Post /wp-admin/post-new.php1,554 ▲922.96 ▼0.28670.64 ▲2.9354.19 ▼5.44
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.02100.24 ▼0.2846.52 ▲1.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: robotstxt, seo, robots

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

The entry point to "WP Robots Txt" version 1.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-robots-txt.php" instead of "robots-txt.php")

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
Success! There were no dangerous files found in this plugin124 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP337214124

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods685.71%
▷ Protected methods114.29%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin