83% dl-robotstxt

Code Review | DL Robots.txt

WordPress plugin DL Robots.txt scored83%from 54 tests.

About plugin

  • Plugin page: dl-robotstxt
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: Aug 26, 2016
  • Number of updates: 9
  • Update frequency: every 103.7 days
  • Top authors: dyadyalesha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /11,811 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.01MB] [CPU: ▼4.76ms] Passed 4 tests

Server-side resources used by DL Robots.txt
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.47 ▲2.69
Dashboard /wp-admin3.31 ▲0.0146.66 ▼8.07
Posts /wp-admin/edit.php3.37 ▲0.0143.78 ▼2.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.96 ▼6.64
Media Library /wp-admin/upload.php3.24 ▲0.0131.77 ▼2.20

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for DL Robots.txt
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.51 ▲0.161.73 ▲0.0244.16 ▲4.04
Dashboard /wp-admin2,214 ▲375.63 ▲0.0594.63 ▲9.5144.02 ▲0.70
Posts /wp-admin/edit.php2,119 ▲192.00 ▼0.0236.22 ▲3.0235.25 ▼2.63
Add New Post /wp-admin/post-new.php1,541 ▲1523.27 ▲0.11662.37 ▼46.2060.02 ▲2.98
Media Library /wp-admin/upload.php1,416 ▲164.19 ▼0.0694.30 ▼0.1040.35 ▼2.27

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
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dl-robotstxt/dl-robots-txt.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/dl-robotstxt/options-page.php:11

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 90% 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Настройки плагина)
You can look at the official readme.txt

dl-robotstxt/dl-robots-txt.php 85% from 13 tests

The main PHP file in "DL Robots.txt" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dl-robotstxt.php" instead of "dl-robots-txt.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 238 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24612110

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png157.77KB51.67KB▼ 67.25%