78% magic-sitemaps

Code Review | Magic Sitemaps

WordPress plugin Magic Sitemaps scored78%from 54 tests.

About plugin

  • Plugin page: magic-sitemaps
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2016
  • Latest release: Mar 17, 2016
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: pijars (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,866 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.62ms] Passed 4 tests

Analyzing server-side resources used by Magic Sitemaps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.94 ▼15.23
Dashboard /wp-admin3.32 ▼0.0347.21 ▼18.30
Posts /wp-admin/edit.php3.37 ▲0.0148.95 ▲0.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.75 ▼5.47
Media Library /wp-admin/upload.php3.24 ▲0.0141.59 ▲6.22
Magic Sitemaps /wp-admin/options-general.php?page=sitemaps-mwp3.2330.82

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Magic Sitemaps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.31 ▼1.001.85 ▼0.6341.21 ▼18.71
Dashboard /wp-admin2,228 ▲254.83 ▼1.03101.34 ▼16.7638.37 ▼7.01
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0238.25 ▲3.7234.17 ▲0.48
Add New Post /wp-admin/post-new.php1,557 ▲1218.50 ▼4.64656.59 ▼34.9351.46 ▼14.95
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.06130.12 ▲23.1049.39 ▼0.56
Magic Sitemaps /wp-admin/options-general.php?page=sitemaps-mwp1,4802.0223.5227.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • insfires_smwp

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
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=sitemaps-mwp
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method MwpSitemapPage::index() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=sitemaps-mwp
    • > Notice in wp-content/plugins/magic-sitemaps/admin.php+5
    Undefined variable: report

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/magic-sitemaps/sitemap-xsl.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/magic-sitemaps/sitemap-for-mwp.php:36

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 Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: google sitemaps, seo, sitemaps, image sitemaps

magic-sitemaps/sitemap-for-mwp.php 85% from 13 tests

The main PHP script in "Magic Sitemaps" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("magic-sitemaps.php" instead of "sitemap-for-mwp.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected858 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33921855
JavaScript1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity36.50
▷ Minimum class complexity6.00
▷ Maximum class complexity67.00
Average method complexity6.07
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods750.00%
▷ Protected methods00.00%
▷ Private methods750.00%
Functions1
▷ Named functions1100.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 files were detected