68% advanced-database-replacer

Code Review | Advanced Database Replacer

WordPress plugin Advanced Database Replacer scored 68% from 54 tests.

About plugin

  • Plugin page: advanced-database...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 5.9.2
  • First release: Dec 28, 2020
  • Latest release: Apr 21, 2021
  • Number of updates: 6
  • Update frequency: every 19.0 days
  • Top authors: dam6pl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 331 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲4.78MB] [CPU: ▼292.65ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Database Replacer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.69 ▲5.1876.25 ▲15.53
Dashboard /wp-admin8.71 ▲5.3060.96 ▲23.66
Posts /wp-admin/edit.php8.71 ▲5.0765.42 ▲24.15
Add New Post /wp-admin/post-new.php10.56 ▲3.59124.03 ▼1,233.95
Media Library /wp-admin/upload.php8.71 ▲5.4160.25 ▲25.11
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.7147.64

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 372 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

Advanced Database Replacer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,859 ▲13715.36 ▼0.576.92 ▲0.912.67 ▼0.03
Dashboard /wp-admin2,955 ▲946.20 ▼0.01122.65 ▼21.47205.53 ▲29.88
Posts /wp-admin/edit.php2,752 ▲613.27 ▼0.0974.47 ▲7.43219.25 ▲66.48
Add New Post /wp-admin/post-new.php1,927 ▲29220.85 ▲2.04507.81 ▲30.48159.37 ▼49.20
Media Library /wp-admin/upload.php1,758 ▲605.53 ▼0.00141.01 ▼7.40299.86 ▲102.51
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4582.6058.04123.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/advanced-database-replacer/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 4 options
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advanced-database-replacer/vendor/freemius/wordpress-sdk/templates/ajax-loader.php
    • > /wp-content/plugins/advanced-database-replacer/adr.php
  • 134× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/advanced-database-replacer/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedDatabaseReplacer\\Replacer\\Form\\Field\\AbstractField' not found in wp-content/plugins/advanced-database-replacer/src/Replacer/Form/Field/Group.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedDatabaseReplacer\\Replacer\\Form\\Update\\AbstractUpdate' not found in wp-content/plugins/advanced-database-replacer/src/Replacer/Form/Update/User/UserFieldUpdate.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedDatabaseReplacer\\Replacer\\Form\\Condition\\AbstractCondition' not found in wp-content/plugins/advanced-database-replacer/src/Replacer/Form/Condition/Post/PostStatusCondition.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/advanced-database-replacer/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/advanced-database-replacer/vendor/bradmkjr/monolog-wordpress/src/WordPressHandler/WordPressHandler.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/advanced-database-replacer/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/advanced-database-replacer/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedDatabaseReplacer\\Replacer\\Form\\Update\\AbstractUpdate' not found in wp-content/plugins/advanced-database-replacer/src/Replacer/Form/Update/Post/PostFieldUpdate.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/advanced-database-replacer/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php:21

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: woocommerce, database, users, taxonomy, cpt...

advanced-database-replacer/adr.php 85% from 13 tests

The main PHP file in "Advanced Database Replacer" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-database-replacer.php" instead of "adr.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin41,993 lines of code in 324 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity24.41
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
▷ Abstract classes157.58%
▷ Concrete classes18392.42%
▷ Final classes21.09%
▷ Static methods24212.11%
▷ Public methods1,42171.09%
▷ Protected methods1758.75%
▷ Private methods40320.16%
▷ Named functions9673.28%
▷ Anonymous functions3526.72%
▷ Global constants10052.36%
▷ Class constants9147.64%
▷ Public constants7178.02%

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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%