10% advanced-custom-fields-migrator

Code Review | Advanced Custom Fields Migration Cleanup

WordPress plugin Advanced Custom Fields Migration Cleanup scored 10% 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: 5.9.2
  • 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,461 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • 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: ▼2.36MB] [CPU: ▼349.21ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields Migration Cleanup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.01 ▼1.514.67 ▼42.42
Dashboard /wp-admin2.03 ▼1.383.72 ▼29.08
Posts /wp-admin/edit.php2.03 ▼1.613.98 ▼31.84
Add New Post /wp-admin/post-new.php2.03 ▼4.944.37 ▼1,293.51
Media Library /wp-admin/upload.php2.03 ▼1.274.43 ▼19.61
ACF Migration /wp-admin/options-general.php?page=acf-migrator-options2.034.26
ACF Migration /wp-admin/tools.php?page=acf-migrator2.035.01

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields Migration Cleanup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.90 ▲0.656.56 ▲0.252.25 ▼0.27
Dashboard /wp-admin2,902 ▲416.00 ▼0.06116.26 ▼18.29158.41 ▼4.75
Posts /wp-admin/edit.php2,698 ▲73.25 ▲0.0064.43 ▼1.40143.35 ▼7.73
Add New Post /wp-admin/post-new.php1,691 ▼6118.18 ▼3.45397.05 ▼55.10160.83 ▲2.72
Media Library /wp-admin/upload.php1,708 ▲105.51 ▼0.01153.22 ▲6.32193.11 ▲3.92
ACF Migration /wp-admin/options-general.php?page=acf-migrator-options1,2813.4669.57151.61
ACF Migration /wp-admin/tools.php?page=acf-migrator1,0542.5656.49108.93

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 cannot be uninstalled
    • > 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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-custom-fields-migrator/class.options.php:306

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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.6.0 1:31592 "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:260:18)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30038)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30340)" 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.6.0 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'mozilla')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Settings - Post Selection), #2 (Settings - General Settings), #3 (ACF Migrator), #4 (ACF Migrator - In progress)
You can look at the official 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery-ui/redmond/images/ui-bg_glass_85_dfeffc_1x400.png0.12KB0.15KB0.00%
jquery-ui/redmond/images/ui-bg_flat_55_fbec88_40x100.png0.21KB0.08KB▼ 59.15%
jquery-ui/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png3.38KB1.68KB▼ 50.10%
screenshot-3.png33.77KB11.41KB▼ 66.21%
screenshot-1.png50.38KB18.04KB▼ 64.20%