10% advanced-custom-fields-migrator

Code Review | Advanced Custom Fields Migration Cleanup

WordPress plugin Advanced Custom Fields Migration Cleanup scored10%from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.4
  • WordPress version: 6.3.1
  • First release: Aug 3, 2012
  • Latest release: Aug 3, 2012
  • Number of updates: 30
  • Update frequency: N/A
  • Top authors: comprock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,672 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/advanced-custom-fields-migrator/advanced-custom-fields-migrator.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; Acf_Field_Migration has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼59.48ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields Migration Cleanup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.315.06 ▼39.79
Dashboard /wp-admin2.22 ▼1.176.53 ▼60.95
Posts /wp-admin/edit.php2.22 ▼1.186.48 ▼41.77
Add New Post /wp-admin/post-new.php2.22 ▼3.717.35 ▼95.39
Media Library /wp-admin/upload.php2.22 ▼1.056.18 ▼30.12
ACF Migration /wp-admin/options-general.php?page=acf-migrator-options2.226.00
ACF Migration /wp-admin/tools.php?page=acf-migrator2.226.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields Migration Cleanup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.28 ▲0.001.78 ▼0.4543.47 ▼2.09
Dashboard /wp-admin2,203 ▲295.49 ▼0.0983.49 ▼5.4339.48 ▼0.39
Posts /wp-admin/edit.php2,111 ▲111.97 ▼0.0634.83 ▼2.4933.50 ▼1.15
Add New Post /wp-admin/post-new.php1,532 ▲623.61 ▲0.34618.83 ▼68.5849.74 ▼3.48
Media Library /wp-admin/upload.php1,411 ▲114.20 ▲0.0598.74 ▼2.3342.04 ▼5.15
ACF Migration /wp-admin/options-general.php?page=acf-migrator-options1,0262.0841.0239.84
ACF Migration /wp-admin/tools.php?page=acf-migrator8461.9027.8131.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/advanced-custom-fields-migrator/advanced-custom-fields-migrator.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; Acf_Field_Migration has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acf-migrator
    • > Deprecated in wp-content/plugins/advanced-custom-fields-migrator/advanced-custom-fields-migrator.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; Acf_Field_Migration has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acf-migrator
    • > Deprecated in wp-content/plugins/advanced-custom-fields-migrator/screen-meta-links.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; wsScreenMetaLinks11 has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-custom-fields-migrator/class.options.php:306
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-custom-fields-migrator/advanced-custom-fields-migrator.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=acf-migrator-options
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'mozilla')" "TypeError: Cannot read properties of undefined (reading 'mozilla')\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=acf-migrator-options:259:18)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:26990)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=acf-migrator-options
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'mozilla')

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:
  • Screenshots: Please add images for these screenshots: #1 (Settings - Post Selection), #2 (Settings - General Settings), #3 (ACF Migrator), #4 (ACF Migrator - In progress)
You can take inspiration from this readme.txt

advanced-custom-fields-migrator/advanced-custom-fields-migrator.php Passed 13 tests

The entry point to "Advanced Custom Fields Migration Cleanup" version 0.0.5 is a PHP file that has certain tags in its header comment area
84 characters long description:
Correct and prevent Advanced Custom Fields options migration autoload 'yes' to 'no'.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,372 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3302198973
CSS23648395
JavaScript20254

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity36.33
▷ Minimum class complexity16.00
▷ Maximum class complexity51.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
12 PNG files occupy 0.22MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png33.77KB11.41KB▼ 66.21%
jquery-ui/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png0.11KB0.09KB▼ 15.18%
screenshot-4.png83.83KB18.34KB▼ 78.13%
screenshot-1.png50.38KB18.04KB▼ 64.20%
jquery-ui/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%