10% robots-sitemap

Code Review | Robots & Sitemap

WordPress plugin Robots & Sitemap scored10%from 54 tests.

About plugin

  • Plugin page: robots-sitemap
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2020
  • Latest release: Mar 16, 2021
  • Number of updates: 14
  • Update frequency: every 12.8 days
  • Top authors: vo3da (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /4,544 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$dmtable

Server metrics [RAM: ▼1.54MB] [CPU: ▼52.69ms] Passed 4 tests

Server-side resources used by Robots & Sitemap
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.028.93 ▼34.63
Dashboard /wp-admin2.47 ▼0.8410.53 ▼44.34
Posts /wp-admin/edit.php2.47 ▼0.8912.71 ▼37.80
Add New Post /wp-admin/post-new.php2.47 ▼3.4210.77 ▼93.97
Media Library /wp-admin/upload.php2.47 ▼0.7611.40 ▼29.14
VO3DA Plugins /wp-admin/admin.php?page=vo3da-plugins2.4712.37
Robots & Sitemap /wp-admin/admin.php?page=vo3da-robots-sitemap2.479.33

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Robots & Sitemap: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.37 ▲0.191.82 ▲0.1840.31 ▲2.74
Dashboard /wp-admin2,244 ▲705.57 ▼0.10103.35 ▲8.1539.42 ▼4.40
Posts /wp-admin/edit.php2,149 ▲522.02 ▼0.0142.35 ▲3.4934.76 ▼4.93
Add New Post /wp-admin/post-new.php6,385 ▲4,85926.09 ▲2.91967.55 ▲257.1664.75 ▲11.42
Media Library /wp-admin/upload.php1,446 ▲464.24 ▼0.0099.10 ▼14.1748.75 ▲2.10
VO3DA Plugins /wp-admin/admin.php?page=vo3da-plugins280.420.154.48
Robots & Sitemap /wp-admin/admin.php?page=vo3da-robots-sitemap2,3903.3977.2345.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$dmtable
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$dmtable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+104
    Undefined index: separation_enable
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/core/robots/class-robots-file.php+125
    Trying to access array offset on value of type bool
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+33
    Undefined index: post_tag_prioriti
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+45
    Undefined index: post_tag_frequencies
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+55
    Undefined index: post_tag_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+71
    Undefined index: sitemap_dateformat
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+82
    Undefined index: sitemap_disable
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+93
    Undefined index: img_enable
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+115
    Undefined index: sitemapimg_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+146
    Undefined index: sitemapnews_enable
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/sitemap.php+172
    Undefined index: sitemapnews_cat
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/robots.php+25
    Undefined index: disable_robots
    • > GET request to /wp-admin/admin.php?page=vo3da-robots-sitemap
    • > Notice in wp-content/plugins/robots-sitemap/admin/views/components/robots.php+36
    Undefined index: fake_enable

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 27× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: nonce_field in wp-content/plugins/robots-sitemap/admin/views/components/term-metabox.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Sitemap\\Sitemap' not found in wp-content/plugins/robots-sitemap/core/sitemap/class-sitemap-post-type.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Db\\Sitemap_DB' not found in wp-content/plugins/robots-sitemap/core/db/news/class-sitemap-news-item-repository.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/robots-sitemap/admin/views/components/term-metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Db\\Sitemap_DB' not found in wp-content/plugins/robots-sitemap/core/db/term/class-sitemap-term-item-repository.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Cache\\Sitemap_Cache' not found in wp-content/plugins/robots-sitemap/core/cache/class-sitemap-cache-news.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Db\\Post\\Sitemap_Post_Item' not found in wp-content/plugins/robots-sitemap/core/db/image/class-sitemap-image-item.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Db\\Sitemap_DB' not found in wp-content/plugins/robots-sitemap/core/db/post/class-sitemap-post-item-repository.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/robots-sitemap/admin/views/components/metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Robots_Sitemap\\Core\\Cache\\Sitemap_Cache' not found in wp-content/plugins/robots-sitemap/core/cache/class-sitemap-cache-post.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=vo3da-plugins
    • > Network (severe)
    wp-admin/admin.php?page=vo3da-plugins - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 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
9 plugin tags: sitemap by type, seo, indexing, robots, xml...

robots-sitemap/robots-sitemap.php Passed 13 tests

The primary PHP file in "Robots & Sitemap" version 1.3.0 is used by WordPress to initiate all plugin functionality
49 characters long description:
Simply and fast edit your robots.txt and sitemap.

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
No dangerous file extensions were detected4,181 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP487352,2973,216
XML4600629
JavaScript4511179
PO File16071141
SVG1008
CSS2107
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes38
▷ Abstract classes37.89%
▷ Concrete classes3592.11%
▷ Final classes00.00%
Methods234
▷ Static methods93.85%
▷ Public methods15064.10%
▷ Protected methods4017.09%
▷ Private methods4418.80%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/sort_asc.png0.16KB0.25KB0.00%
admin/assets/images/sort_desc.png0.15KB0.25KB0.00%
admin/assets/images/sort_both.png0.20KB0.29KB0.00%
admin/assets/images/search.png0.33KB0.39KB0.00%