84% sitemap-with-woocommerce

Code Review | Sitemap with woocommerce

WordPress plugin Sitemap with woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: sitemap-with-wooc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0.0
  • WordPress version: 6.3.1
  • First release: Mar 8, 2018
  • Latest release: Feb 12, 2021
  • Number of updates: 18
  • Update frequency: every 59.6 days
  • Top authors: omsuhani (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /18,522 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.01MB] [CPU: ▼9.61ms] Passed 4 tests

An overview of server-side resources used by Sitemap with woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0341.57 ▼2.15
Dashboard /wp-admin3.37 ▼0.0248.74 ▼16.19
Posts /wp-admin/edit.php3.42 ▲0.0248.75 ▲0.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0284.29 ▼16.77
Media Library /wp-admin/upload.php3.29 ▲0.0233.70 ▼3.31

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Sitemap with woocommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.34 ▼0.021.73 ▲0.2046.60 ▲5.95
Dashboard /wp-admin2,192 ▲125.51 ▼0.1187.50 ▼14.1739.03 ▼1.11
Posts /wp-admin/edit.php2,097 ▼02.02 ▲0.0433.73 ▼5.2634.52 ▲1.14
Add New Post /wp-admin/post-new.php1,533 ▲723.31 ▼0.36615.96 ▼48.9449.33 ▼3.36
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.0293.95 ▼11.2441.52 ▼4.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× 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/sitemap-with-woocommerce/index.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Quicktags in WordPress text editor), #2 (display of sitemap)
Please take inspiration from this readme.txt

sitemap-with-woocommerce/index.php 92% from 13 tests

"Sitemap with woocommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sitemap-with-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected199 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP130075157
PO File17838
CSS1154

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.37
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/aro1.png1.06KB0.22KB▼ 79.67%