84% database-anonymization

Code Review | Database Anonymization

WordPress plugin Database Anonymization scored84%from 54 tests.

About plugin

  • Plugin page: database-anonymiz...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2023
  • Latest release: Oct 20, 2023
  • Number of updates: 5
  • Update frequency: every 5.0 days
  • Top authors: robinlopulalan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.49ms] Passed 4 tests

Server-side resources used by Database Anonymization
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.24 ▼0.54
Dashboard /wp-admin3.36 ▲0.0650.22 ▲5.38
Posts /wp-admin/edit.php3.41 ▲0.0646.68 ▲0.05
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.60 ▼10.05
Media Library /wp-admin/upload.php3.28 ▲0.0635.41 ▲0.58
Database Anonymization /wp-admin/tools.php?page=database-anonymization-main3.3432.43

Server storage [IO: ▲0.51MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 15 new options
New WordPress options
dbanon_streets
db_upgraded
dbanon_names
dbanon_ibans
dbanon_domains
dbanon_rows
widget_theysaidso_widget
dbanon_cities
dbanon_agents
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Database Anonymization
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.36 ▼0.261.79 ▲0.1942.02 ▲3.25
Dashboard /wp-admin2,200 ▲235.55 ▼0.0583.09 ▼0.0238.20 ▼5.17
Posts /wp-admin/edit.php2,111 ▲112.05 ▲0.0836.24 ▲0.9730.59 ▼0.48
Add New Post /wp-admin/post-new.php1,536 ▲1022.91 ▼0.71656.07 ▼24.5555.77 ▲5.05
Media Library /wp-admin/upload.php1,411 ▲84.21 ▲0.0299.21 ▲4.9941.64 ▼4.96
Database Anonymization /wp-admin/tools.php?page=database-anonymization-main1,5191.6927.2242.17

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DBAnon\\esc_url() in wp-content/plugins/database-anonymization/admin/partials/database-anonymization-admin-main-page.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DBAnon\\plugin_dir_path() in wp-content/plugins/database-anonymization/admin/class-transformation.php:2804

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

database-anonymization/database-anonymization.php Passed 13 tests

The primary PHP file in "Database Anonymization" version 1.2.0 is used by WordPress to initiate all plugin functionality
136 characters long description:
Anonymize personal data (PII) in WordPress databases for development and testing. Comply with rules and regulations, prevent data leaks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,007 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP254262,8914,885
PO File1254371967
JSON820664
JavaScript129184291
CSS1434200

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.39
Average class complexity55.91
▷ Minimum class complexity1.00
▷ Maximum class complexity293.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods169
▷ Static methods21.18%
▷ Public methods9958.58%
▷ Protected methods4426.04%
▷ Private methods2615.38%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants9
▷ Global constants222.22%
▷ Class constants777.78%
▷ Public constants114.29%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin