84% dreamhost-automated-migration

Code Review | DreamHost Automated Migration

WordPress plugin DreamHost Automated Migration scored84%from 54 tests.

About plugin

  • Plugin page: dreamhost-automat...
  • Plugin version: 5.25
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Sep 11, 2023
  • Number of updates: 35
  • Update frequency: every 41.3 days
  • Top authors: ritesh.soni36 (88.57%)akshatc (14.29%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20,000+ active /171,067 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.24ms] Passed 4 tests

A check of server-side resources used by DreamHost Automated Migration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2044.72 ▲1.76
Dashboard /wp-admin3.53 ▲0.2352.12 ▼2.43
Posts /wp-admin/edit.php3.58 ▲0.2258.91 ▼0.11
Add New Post /wp-admin/post-new.php6.05 ▲0.1689.33 ▼8.18
Media Library /wp-admin/upload.php3.39 ▲0.1644.12 ▲6.62

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for DreamHost Automated Migration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.78 ▲0.131.58 ▼1.2140.70 ▼22.92
Dashboard /wp-admin2,209 ▲214.84 ▼0.08108.87 ▼11.5067.46 ▲24.16
Posts /wp-admin/edit.php2,114 ▲251.98 ▼0.0638.52 ▲1.7836.18 ▼3.00
Add New Post /wp-admin/post-new.php1,528 ▲723.07 ▲0.19839.15 ▲180.5656.12 ▲2.61
Media Library /wp-admin/upload.php1,406 ▲184.22 ▲0.02112.81 ▼2.5877.90 ▲30.52

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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 esc_url() in wp-content/plugins/dreamhost-automated-migration/admin/main_page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
2 plugin tags: dreamhost, migration

dreamhost-automated-migration/dreamhost.php 92% from 13 tests

The principal PHP file in "DreamHost Automated Migration" v. 5.25 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dreamhost-automated-migration.php" instead of "dreamhost.php")

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
There were no executable files found in this plugin3,387 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP23454483,320
CSS10067

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity25.87
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods238
▷ Static methods3213.45%
▷ Public methods23799.58%
▷ Protected methods00.00%
▷ Private methods10.42%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/blogvault-logo.png4.06KB3.29KB▼ 19.01%
assets/img/dreamhost-logo.png27.89KB11.74KB▼ 57.89%