84% pdf-sitemap

Code Review | XML Sitemap for PDFs for Yoast SEO

WordPress plugin XML Sitemap for PDFs for Yoast SEO scored84%from 54 tests.

About plugin

  • Plugin page: pdf-sitemap
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2022
  • Latest release: Apr 6, 2023
  • Number of updates: 6
  • Update frequency: every 19.8 days
  • Top authors: joostdevalk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by XML Sitemap for PDFs for Yoast SEO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.76 ▼2.03
Dashboard /wp-admin3.33 ▲0.0346.53 ▼1.67
Posts /wp-admin/edit.php3.39 ▲0.0346.91 ▲0.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.21 ▼7.08
Media Library /wp-admin/upload.php3.26 ▲0.0335.20 ▲1.63

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

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

Browser metrics Passed 4 tests

XML Sitemap for PDFs for Yoast SEO: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.161.61 ▲0.0341.06 ▼1.30
Dashboard /wp-admin2,195 ▲175.63 ▼0.1286.05 ▼15.9137.32 ▼1.49
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0435.49 ▼0.6031.66 ▼6.75
Add New Post /wp-admin/post-new.php1,528 ▼923.10 ▲4.82598.32 ▼55.4453.24 ▼40.19
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0496.95 ▼5.6840.29 ▼2.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pdf-sitemap/pdf-sitemap.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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: seo, pdfs, xml-sitemaps

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

This is the main PHP file of "XML Sitemap for PDFs for Yoast SEO" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
52 characters long description:
Creates an XML sitemap for PDFs, requires Yoast SEO.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin322 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13676118
XSLT1150114
JSON10061
Markdown120029

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods763.64%
▷ Protected methods19.09%
▷ Private methods327.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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