84% wp-migrate-db-anonymization

Code Review | WP Migrate DB Anonymization

WordPress plugin WP Migrate DB Anonymization scored84%from 54 tests.

About plugin

  • Plugin page: wp-migrate-db-ano...
  • Plugin version: 0.3.4
  • PHP compatiblity: 5.3.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: May 23, 2018
  • Latest release: Jan 26, 2022
  • Number of updates: 12
  • Update frequency: every 112.8 days
  • Top authors: deliciousbrains (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /14,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.74ms] Passed 4 tests

An overview of server-side resources used by WP Migrate DB Anonymization
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.1543.81 ▼1.36
Dashboard /wp-admin3.71 ▲0.1552.68 ▲3.82
Posts /wp-admin/edit.php3.76 ▲0.0853.59 ▲0.51
Add New Post /wp-admin/post-new.php6.23 ▲0.0896.83 ▼13.33
Media Library /wp-admin/upload.php3.57 ▲0.0839.92 ▲3.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Migrate DB Anonymization
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.26 ▼0.422.39 ▲0.4447.08 ▲2.70
Dashboard /wp-admin2,195 ▲185.69 ▲0.0993.03 ▲1.8542.33 ▲1.45
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0342.27 ▲6.7235.25 ▲0.03
Add New Post /wp-admin/post-new.php1,545 ▼123.19 ▲0.03658.10 ▼43.0262.52 ▲6.36
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.0299.76 ▼9.6844.09 ▼3.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 508× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\fr_FR\\Address' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Internet' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Internet.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\fr_FR\\Company' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\fr_FR\\Company' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\PhoneNumber' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\es_ES\\Address' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Address' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Internet' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/el_CY/Internet.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Internet' not found in wp-content/plugins/wp-migrate-db-anonymization/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Internet.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-migrate-db-anonymization/wp-migrate-db-anonymization.php Passed 13 tests

The main PHP script in "WP Migrate DB Anonymization" version 0.3.4 is automatically included on every request by WordPress
78 characters long description:
An extension to WP Migrate DB and WP Migrate DB Pro that anonymizes user data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin85,501 lines of code in 568 files:
LanguageFilesBlank linesComment linesLines of code
PHP55812,8849,77283,554
Markdown441401,798
JSON300112
YAML16018
XML11011
make1208

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.70
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces128
Interfaces0
Traits0
Classes551
▷ Abstract classes10.18%
▷ Concrete classes55099.82%
▷ Final classes00.00%
Methods1,636
▷ Static methods65139.79%
▷ Public methods1,54894.62%
▷ Protected methods603.67%
▷ Private methods281.71%
Functions114
▷ Named functions54.39%
▷ Anonymous functions10995.61%
Constants42
▷ Global constants00.00%
▷ Class constants42100.00%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin