78% tj-google-sitemaps-xml

Code Review | TJ Google Sitemaps XML

WordPress plugin TJ Google Sitemaps XML scored 78% from 54 tests.

About plugin

  • Plugin page: tj-google-sitemap...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Nov 20, 2012
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: egower (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.69ms] Passed 4 tests

Analyzing server-side resources used by TJ Google Sitemaps XML
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.02 ▼2.89
Dashboard /wp-admin3.33 ▲0.0347.42 ▼0.76
Posts /wp-admin/edit.php3.38 ▲0.0346.20 ▼2.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.75 ▼20.38
Media Library /wp-admin/upload.php3.25 ▲0.0238.90 ▲4.81
TJ Sitemaps /wp-admin/tools.php?page=tj-sitemap3.1927.82

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by TJ Google Sitemaps XML
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.031.83 ▼0.1844.60 ▲0.06
Dashboard /wp-admin2,213 ▲285.84 ▼0.0497.54 ▼20.8439.41 ▼6.38
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0141.13 ▲3.1937.69 ▲4.10
Add New Post /wp-admin/post-new.php1,537 ▲2322.96 ▲5.49604.56 ▼86.9749.99 ▲2.67
Media Library /wp-admin/upload.php1,395 ▲74.27 ▲0.0499.61 ▼4.4045.35 ▲0.71
TJ Sitemaps /wp-admin/tools.php?page=tj-sitemap7822.0425.1528.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=tj-sitemap
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method TJSitemap::display_options() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=tj-sitemap
    • > Notice in wp-content/plugins/tj-google-sitemaps-xml/tj-sitemap.php+117
    Undefined variable: checked

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tj-google-sitemaps-xml/tj-sitemap.php:129

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: google, sitemapxml, sitemap

tj-google-sitemaps-xml/tj-sitemap.php 92% from 13 tests

The primary PHP file in "TJ Google Sitemaps XML" version 1.01 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tj-google-sitemaps-xml.php" instead of "tj-sitemap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected95 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1251695

PHP code Passed 2 tests

A brief analysis 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 complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin