77% google-sitemap-plugin

Code Review | Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin

WordPress plugin Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin scored77%from 54 tests.

About plugin

  • Plugin page: google-sitemap-pl...
  • Plugin version: 3.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 26, 2012
  • Latest release: Aug 28, 2023
  • Number of updates: 93
  • Update frequency: every 44.9 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

113 reviews

Install metrics

40,000+ active /2,040,203 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.05MB] [CPU: ▲3.49ms] Passed 4 tests

Server-side resources used by Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.56 ▲1.0945.92 ▲3.09
Dashboard /wp-admin4.38 ▲1.0857.41 ▲7.86
Posts /wp-admin/edit.php4.43 ▲1.0861.13 ▲11.66
Add New Post /wp-admin/post-new.php6.92 ▲1.0492.10 ▼8.66
Media Library /wp-admin/upload.php4.24 ▲1.0147.62 ▲12.05

Server storage [IO: ▲6.36MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • The plugin illegally modified 1 file (0.74KB) outside of "wp-content/plugins/google-sitemap-plugin/" and "wp-content/uploads/"
    • (new file) sitemap.xml
Filesystem: 186 new files
Database: no new tables, 8 new options
New WordPress options
bstwbsftwppdtplgns_options
can_compress_scripts
widget_recent-posts
gglstmp_options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.78 ▲0.221.86 ▼0.0039.89 ▼4.93
Dashboard /wp-admin2,231 ▲545.60 ▼0.0789.24 ▲0.2840.86 ▼1.78
Posts /wp-admin/edit.php2,142 ▲422.03 ▲0.0239.69 ▲2.9934.82 ▼4.12
Add New Post /wp-admin/post-new.php6,262 ▲4,73626.11 ▲3.15937.54 ▲232.9252.17 ▼3.90
Media Library /wp-admin/upload.php1,442 ▲424.30 ▲0.07100.54 ▼4.6547.10 ▲1.11
Settings /wp-admin/google-sitemap-plugin.php260.420.1114.27
Custom Links /wp-admin/google-sitemap-custom-links.php260.420.105.52
BWS Panel /wp-admin/google-sitemap-plugin.php?page=gglstmp-bws-panel260.420.087.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/google-sitemap-plugin/google_api/../autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/google-sitemap-plugin/google_api/Collection.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/google-sitemap-plugin/google_api/Service/SiteVerification.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-sitemap-plugin/bws_menu/class-bws-settings.php:1453
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/google-sitemap-plugin/includes/class-gglstmp-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/google-sitemap-plugin/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/google-sitemap-plugin/google-sitemap-plugin.php:2127
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/google-sitemap-plugin/google_api/Service/Webmasters.php:31
    • > PHP Warning
      require_once(wp-content/plugins/google-sitemap-plugin/google_api/../autoload.php): failed to open stream: No such file or directory in wp-content/plugins/google-sitemap-plugin/google_api/Collection.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/google-sitemap-plugin.php
    • > Network (severe)
    wp-admin/google-sitemap-plugin.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/google-sitemap-custom-links.php
    • > Network (severe)
    wp-admin/google-sitemap-custom-links.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/google-sitemap-plugin.php?page=gglstmp-bws-panel
    • > Network (severe)
    wp-admin/google-sitemap-plugin.php?page=gglstmp-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings page.), #2 (Settings page after the authorization via Google Account.), #3 (Sitemap Structure Settings.)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

google-sitemap-plugin/google-sitemap-plugin.php Passed 13 tests

The main PHP file in "Sitemap by BestWebSoft - WordPress XML Site Map Page Generator Plugin" ver. 3.2.9 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Generate and add XML sitemap to WordPress website. Help search engines index your blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected34,871 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
PO File176,60111,79816,296
PHP581,6103,78312,000
CSS91572565,361
XSLT4583545
JavaScript627110502
SVG400167

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity13.54
▷ Minimum class complexity1.00
▷ Maximum class complexity210.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes71
▷ Abstract classes68.45%
▷ Concrete classes6591.55%
▷ Final classes00.00%
Methods470
▷ Static methods132.77%
▷ Public methods40786.60%
▷ Protected methods204.26%
▷ Private methods439.15%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants51
▷ Global constants23.92%
▷ Class constants4996.08%
▷ Public constants49100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
64 PNG files occupy 3.59MB with 1.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pro_screen_1.png205.09KB64.87KB▼ 68.37%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
bws_menu/icons/themes/rent-a-bike.png273.38KB112.59KB▼ 58.82%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%