84% block-chat-gpt-via-robots-txt

Code Review | Block Chat GPT via robots.txt

WordPress plugin Block Chat GPT via robots.txt scored84%from 54 tests.

About plugin

  • Plugin page: block-chat-gpt-vi...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2023
  • Latest release: Aug 8, 2023
  • Number of updates: 10
  • Update frequency: every 17.2 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /638 total downloads


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.02MB] [CPU: ▼7.55ms] Passed 4 tests

An overview of server-side resources used by Block Chat GPT via robots.txt
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0254.27 ▲11.25
Dashboard /wp-admin3.36 ▲0.0249.21 ▼3.24
Posts /wp-admin/edit.php3.41 ▲0.0247.50 ▼3.91
Add New Post /wp-admin/post-new.php5.94 ▲0.0286.26 ▼27.34
Media Library /wp-admin/upload.php3.29 ▲0.0241.28 ▲4.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Block Chat GPT via robots.txt
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.011.69 ▼0.4242.95 ▼2.29
Dashboard /wp-admin2,195 ▲155.61 ▼0.0598.33 ▲6.3540.86 ▼5.39
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0740.05 ▼5.5836.33 ▼5.44
Add New Post /wp-admin/post-new.php1,526 ▼021.14 ▼1.91737.66 ▲76.4263.62 ▲1.87
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.00102.52 ▲6.2446.07 ▲1.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-chat-gpt-via-robots-txt/block-chatgpt-robots-txt.php:26

User-side errors Passed 1 test

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


Plugin configuration 93% 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
6 plugin tags: robots, robotstxt, bot, robot, crawler...

block-chat-gpt-via-robots-txt/block-chatgpt-robots-txt.php 85% from 13 tests

The main PHP file in "Block Chat GPT via robots.txt" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("block-chat-gpt-via-robots-txt.php" instead of "block-chatgpt-robots-txt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin86 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File16661

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ 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