78% simple-image-xml-sitemap

Code Review | Simple Image XML Sitemap

WordPress plugin Simple Image XML Sitemap scored78%from 54 tests.

About plugin

  • Plugin page: simple-image-xml-...
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 14, 2019
  • Latest release: Sep 3, 2023
  • Number of updates: 27
  • Update frequency: every 53.8 days
  • Top authors: blapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /4,940 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.95ms] Passed 4 tests

Analyzing server-side resources used by Simple Image XML Sitemap
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0735.84 ▼4.12
Dashboard /wp-admin3.39 ▲0.0842.68 ▼2.69
Posts /wp-admin/edit.php3.50 ▲0.1449.21 ▼3.03
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.85 ▼17.94
Media Library /wp-admin/upload.php3.31 ▲0.0835.59 ▼2.03
Simple Image XML Sitemap /wp-admin/tools.php?page=simple-xml-image-sitemap3.2829.98
Simple XML Image Sitemap /wp-admin/options-general.php?page=plugin_sixs3.2528.46

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
sixs_posttypes_option_name
db_upgraded
sixs_title_1_option_name
can_compress_scripts
sixs_option_name
widget_recent-posts
widget_theysaidso_widget
sixs_xml_autosave_option_name
...

Browser metrics Passed 4 tests

Checking browser requirements for Simple Image XML Sitemap
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.84 ▲0.841.82 ▼0.0341.80 ▼1.81
Dashboard /wp-admin2,211 ▲235.87 ▲0.98113.01 ▲7.3641.94 ▼2.81
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0639.36 ▼1.5036.74 ▲0.82
Add New Post /wp-admin/post-new.php1,540 ▲723.44 ▲0.10664.88 ▲18.1760.57 ▲2.57
Media Library /wp-admin/upload.php1,396 ▲84.26 ▲0.0496.70 ▼22.7343.74 ▼4.95
Simple Image XML Sitemap /wp-admin/tools.php?page=simple-xml-image-sitemap7772.0525.2825.97
Simple XML Image Sitemap /wp-admin/options-general.php?page=plugin_sixs1,1102.0522.4830.02

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • sixs_option_name
    • sixs_xml_autosave_option_name
    • sixs_posttypes_option_name
    • theysaidso_admin_options
    • sixs_title_1_option_name
    • sixs_caption_1_option_name
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=plugin_sixs
    • > Notice in wp-content/plugins/simple-image-xml-sitemap/sixs_functions.php+123
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-image-xml-sitemap/sixs_functions.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-image-xml-sitemap/simple-xml-image-sitemap.php:17

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: xml image sitemap, advanced custom fields, google image sitemaps

simple-image-xml-sitemap/simple-xml-image-sitemap.php 77% from 13 tests

The main PHP file in "Simple Image XML Sitemap" ver. 3.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-image-xml-sitemap.php" instead of "simple-xml-image-sitemap.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected531 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28427425
PO File13140106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions11
▷ Named functions11100.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
PNG images were not found in this plugin