84% advanced-robots-txt-optimizer-editor

Code Review | Advanced Robots.txt Optimizer & Editor

WordPress plugin Advanced Robots.txt Optimizer & Editor scored84%from 54 tests.

About plugin

  • Plugin page: advanced-robots-t...
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2023
  • Latest release: Apr 15, 2023
  • Number of updates: 13
  • Update frequency: every 3.8 days
  • Top authors: aleemiqbal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,212 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼3.38ms] Passed 4 tests

Analyzing server-side resources used by Advanced Robots.txt Optimizer & Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.92 ▼5.51
Dashboard /wp-admin3.52 ▲0.2151.00 ▲1.62
Posts /wp-admin/edit.php3.57 ▲0.2150.11 ▲0.86
Add New Post /wp-admin/post-new.php6.12 ▲0.2384.58 ▼9.63
Media Library /wp-admin/upload.php3.44 ▲0.2139.23 ▲0.75

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Robots.txt Optimizer & Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2614.36 ▲0.011.58 ▼0.2144.22 ▼0.48
Dashboard /wp-admin2,218 ▲415.59 ▼0.0887.61 ▼4.0238.63 ▼4.47
Posts /wp-admin/edit.php2,126 ▲231.98 ▲0.0239.30 ▲0.6832.71 ▼5.58
Add New Post /wp-admin/post-new.php1,546 ▲1822.96 ▼0.11668.98 ▲21.7850.48 ▼6.98
Media Library /wp-admin/upload.php1,423 ▲234.24 ▲0.07108.43 ▲11.8448.87 ▲5.10

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

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-robots-txt-optimizer-editor/includes/robotsincludes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-robots-txt-optimizer-editor/robotstxt-optimizer.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: robots, crawl, crawler, robotstxt, search engines...

advanced-robots-txt-optimizer-editor/robotstxt-optimizer.php 85% from 13 tests

Analyzing the main PHP file in "Advanced Robots.txt Optimizer & Editor" version 1.5
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-robots-txt-optimizer-editor.php" instead of "robotstxt-optimizer.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 378 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin547 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12181290
CSS110192
PHP3321,39365

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin