93% acf-woocommerce-account-fields

Code Review | ACF Woocommerce Account Fields

WordPress plugin ACF Woocommerce Account Fields scored 93% from 54 tests.

About plugin

  • Plugin page: acf-woocommerce-a...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.2.1
  • WordPress version: 5.9.2
  • First release: Jul 3, 2019
  • Latest release: Jul 3, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: kenkeydev (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active / 3,082 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼302.04ms] Passed 4 tests

Server-side resources used by ACF Woocommerce Account Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0755.84 ▲7.44
Dashboard /wp-admin3.49 ▲0.0733.64 ▲0.47
Posts /wp-admin/edit.php3.71 ▲0.0738.92 ▲1.02
Add New Post /wp-admin/post-new.php6.95 ▼0.0393.28 ▼1,210.49
Media Library /wp-admin/upload.php3.36 ▲0.0625.35 ▲0.85

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by ACF Woocommerce Account Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲1116.07 ▲0.176.21 ▲0.392.25 ▼0.53
Dashboard /wp-admin2,895 ▲346.40 ▲0.08117.34 ▼18.36166.85 ▲2.63
Posts /wp-admin/edit.php2,694 ▲33.44 ▲0.0162.92 ▼5.44141.51 ▼12.34
Add New Post /wp-admin/post-new.php1,660 ▼016.57 ▲0.39406.77 ▼6.05164.05 ▲12.72
Media Library /wp-admin/upload.php1,698 ▼05.73 ▲0.00143.30 ▲2.64186.84 ▲0.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/acf-woocommerce-account-fields/acf-wc-account-fields.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (This is an example of setting the ACF form locations in Woocommerce) image missing
Please take inspiration from this readme.txt

acf-woocommerce-account-fields/acf-wc-account-fields.php 85% from 13 tests

The main PHP script in "ACF Woocommerce Account Fields" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-woocommerce-account-fields.php" instead of "acf-wc-account-fields.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected215 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
2 PNG files occupy 0.21MB with 0.16MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png84.51KB21.55KB▼ 74.50%
screenshot-1.png133.04KB34.62KB▼ 73.98%