90% robots-txt-editor

Code Review | Robots.txt Editor

WordPress plugin Robots.txt Editor scored90%from 54 tests.

About plugin

  • Plugin page: robots-txt-editor
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Jan 16, 2021
  • Number of updates: 13
  • Update frequency: every 48.0 days
  • Top authors: processby (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

20,000+ active /80,521 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.96ms] Passed 4 tests

Server-side resources used by Robots.txt Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.16 ▼1.91
Dashboard /wp-admin3.40 ▲0.1060.22 ▲4.75
Posts /wp-admin/edit.php3.51 ▲0.1651.49 ▼1.40
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.93 ▼15.56
Media Library /wp-admin/upload.php3.32 ▲0.1038.43 ▲3.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
robotsOptions
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Robots.txt Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.65 ▲0.271.73 ▲0.1346.88 ▲2.67
Dashboard /wp-admin2,198 ▲185.62 ▼0.0489.97 ▲1.2842.73 ▲6.00
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0734.59 ▼4.0735.95 ▼1.35
Add New Post /wp-admin/post-new.php1,526 ▼123.09 ▲0.11661.10 ▼12.9651.63 ▼6.58
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0195.63 ▼15.6141.86 ▼2.39

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (Robots.txt settings) image required
You can take inspiration from this readme.txt

robots-txt-editor/robots-txt-editor.php Passed 13 tests

This is the main PHP file of "Robots.txt Editor" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
24 characters long description:
Robots.txt for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected766 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16199305624
JSON31072
Markdown153070

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.44
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods58.47%
▷ Public methods5796.61%
▷ Protected methods00.00%
▷ Private methods23.39%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.45KB14.75KB▼ 53.10%