72% acf-pro-sync

Code Review | ACF Pro JSON Sync

WordPress plugin ACF Pro JSON Sync scored 72% 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: 5.9.2
  • 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

200+ active / 3,119 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼306.78ms] Passed 4 tests

This is a short check of server-side resources used by ACF Pro JSON Sync
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0255.94 ▲7.69
Dashboard /wp-admin3.43 ▲0.0234.75 ▲0.12
Posts /wp-admin/edit.php3.66 ▲0.0240.24 ▲1.55
Add New Post /wp-admin/post-new.php6.91 ▼0.0692.96 ▼1,227.85
Media Library /wp-admin/upload.php3.31 ▲0.0224.82 ▼0.95
Sync ACF /wp-admin/admin.php?page=sync_acf3.2821.47
Run Sync /wp-admin/admin.php?page=run_acf_sync3.2721.61

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF Pro JSON Sync
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲4515.89 ▲0.235.83 ▼0.072.12 ▼0.13
Dashboard /wp-admin2,928 ▲706.14 ▼0.17120.16 ▼16.91157.77 ▼6.39
Posts /wp-admin/edit.php2,724 ▲333.24 ▲0.0164.05 ▼2.37137.85 ▼13.11
Add New Post /wp-admin/post-new.php1,735 ▼1721.69 ▲0.83442.11 ▼30.40163.25 ▲4.10
Media Library /wp-admin/upload.php1,734 ▲335.46 ▼0.04150.08 ▲2.97194.49 ▲7.17
Sync ACF /wp-admin/admin.php?page=sync_acf9041.9737.4797.48
Run Sync /wp-admin/admin.php?page=run_acf_sync8641.9736.3572.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please 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(307): acf_sync_page()
    #3 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(474): 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(307): run_acf_sync()
    #2 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(474): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/acf-pro-sync/views/sync-complete.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-pro-sync/acf-sync.php:178
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/acf-pro-sync/views/sync.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (AFC Pro Sync admin screen) image missing
You can take inspiration from this readme.txt

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

"ACF Pro JSON Sync" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)
  • Main file name: Name the main plugin file 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

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
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%