72% acf-pro-sync

Code Review | ACF Pro JSON Sync

WordPress plugin ACF Pro JSON Sync scored72%from 54 tests.

About plugin

  • Plugin page: acf-pro-sync
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: Jan 5, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: sgengler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.30ms] Passed 4 tests

An overview of server-side resources used by ACF Pro JSON Sync
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0250.04 ▲1.85
Dashboard /wp-admin3.33 ▲0.0252.36 ▼1.36
Posts /wp-admin/edit.php3.38 ▲0.0251.14 ▼3.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.75 ▼10.06
Media Library /wp-admin/upload.php3.25 ▲0.0238.82 ▲2.88
Sync ACF /wp-admin/admin.php?page=sync_acf3.2234.22
Run Sync /wp-admin/admin.php?page=run_acf_sync3.2135.55

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
recovery_mode_email_last_sent
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ACF Pro JSON Sync
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.74 ▲0.151.96 ▼0.0645.18 ▲0.42
Dashboard /wp-admin2,224 ▲605.56 ▲0.0387.81 ▼27.8639.98 ▼4.37
Posts /wp-admin/edit.php2,126 ▲262.02 ▲0.0035.82 ▼4.9235.27 ▼4.16
Add New Post /wp-admin/post-new.php1,560 ▲3218.57 ▼4.32650.15 ▼23.4270.54 ▲19.50
Media Library /wp-admin/upload.php1,429 ▲294.16 ▲0.05101.14 ▼9.5244.95 ▲0.49
Sync ACF /wp-admin/admin.php?page=sync_acf7201.126.7318.22
Run Sync /wp-admin/admin.php?page=run_acf_sync7101.517.0520.23

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
    • > GET request to /wp-admin/admin.php?page=sync_acf
    • > Error in wp-content/plugins/acf-pro-sync/acf-sync.php+15
    Uncaught Error: Call to undefined function acf_get_setting() in wp-content/plugins/acf-pro-sync/acf-sync.php:15
    Stack trace:
    #0 wp-content/plugins/acf-pro-sync/views/sync.php(11): acf_sync_check_json_dirs()
    #1 wp-content/plugins/acf-pro-sync/acf-sync.php(195): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): acf_sync_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=run_acf_sync
    • > Error in wp-content/plugins/acf-pro-sync/acf-sync.php+51
    Uncaught Error: Call to undefined function acf_get_setting() in wp-content/plugins/acf-pro-sync/acf-sync.php:51
    Stack trace:
    #0 wp-content/plugins/acf-pro-sync/acf-sync.php(200): acf_sync_import_json_folder()
    #1 wp-includes/class-wp-hook.php(310): run_acf_sync()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/acf-pro-sync/views/sync-complete.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/acf-pro-sync/views/sync.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-pro-sync/acf-sync.php:178

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (AFC Pro Sync admin screen) image not found
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
Please take inspiration from this readme.txt

acf-pro-sync/acf-sync.php 85% from 13 tests

The main PHP script in "ACF Pro JSON Sync" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-pro-sync.php" instead of "acf-sync.php")

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 plugin163 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37624142
CSS13021

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png54.19KB16.83KB▼ 68.95%