84% site-address-migrator

Code Review | Site Address Migrator

WordPress plugin Site Address Migrator scored84%from 54 tests.

About plugin

  • Plugin page: site-address-migr...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2013
  • Latest release: Dec 22, 2019
  • Number of updates: 10
  • Update frequency: every 243.3 days
  • Top authors: sourcefound (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /5,609 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.03MB] [CPU: ▼4.46ms] Passed 4 tests

An overview of server-side resources used by Site Address Migrator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.62 ▲1.89
Dashboard /wp-admin3.34 ▲0.0448.10 ▼4.56
Posts /wp-admin/edit.php3.39 ▲0.0349.56 ▼5.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.68 ▼9.20
Media Library /wp-admin/upload.php3.26 ▲0.0336.63 ▲1.33
Site Address Updater /wp-admin/options-general.php?page=sf_mgr_options3.2332.42

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Site Address Migrator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.22 ▼1.161.66 ▼0.1841.01 ▼5.87
Dashboard /wp-admin2,219 ▲525.88 ▲0.18111.81 ▲1.4038.77 ▼3.95
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0239.65 ▲0.0334.28 ▼3.01
Add New Post /wp-admin/post-new.php1,529 ▼2617.74 ▼0.86680.08 ▲45.1853.55 ▼3.24
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.02100.26 ▼4.3143.06 ▲0.85
Site Address Updater /wp-admin/options-general.php?page=sf_mgr_options7892.0525.3525.31

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/site-address-migrator/siteaddressmigrator.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === site-address-migrator === )
The official readme.txt might help

site-address-migrator/siteaddressmigrator.php 92% from 13 tests

The primary PHP file in "Site Address Migrator" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("site-address-migrator.php" instead of "siteaddressmigrator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1133196

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions7
▷ Named functions7100.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
There are no PNG files in this plugin