94% acf-price

Code Review | Advanced Custom Fields: Price Field

WordPress plugin Advanced Custom Fields: Price Field scored 94% from 54 tests.

About plugin

  • Plugin page: acf-price
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 5.9.2
  • First release: Jul 16, 2017
  • Latest release: Jul 16, 2017
  • Number of updates: 3
  • Update frequency: every 4.3 days
  • Top authors: speccode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active / 2,898 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Advanced Custom Fields: Price Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0272.31 ▲15.28
Dashboard /wp-admin3.43 ▲0.0354.92 ▲17.75
Posts /wp-admin/edit.php3.66 ▲0.0241.18 ▼7.82
Add New Post /wp-admin/post-new.php6.90 ▼0.0794.74 ▼1,291.65
Media Library /wp-admin/upload.php3.31 ▲0.0229.56 ▲3.91

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields: Price Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1916.27 ▲0.676.31 ▲0.352.51 ▲0.60
Dashboard /wp-admin2,892 ▲316.15 ▼0.04126.10 ▼9.72160.78 ▼3.50
Posts /wp-admin/edit.php2,688 ▲33.24 ▲0.0064.81 ▲0.58147.13 ▲9.85
Add New Post /wp-admin/post-new.php1,661 ▲122.41 ▲5.92411.86 ▼53.24159.86 ▼59.44
Media Library /wp-admin/upload.php1,698 ▼35.47 ▼0.06140.53 ▼5.06186.60 ▼0.42

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
This plugin's 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
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_price_common' not found in wp-content/plugins/acf-price/fields/acf-price-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-price/fields/acf-price-common.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_price_common' not found in wp-content/plugins/acf-price/fields/acf-price-v4.php:3

User-side errors Passed 1 test

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


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: advanced custom fields, price, acf

acf-price/acf-price.php Passed 13 tests

The main PHP script in "Advanced Custom Fields: Price Field" version 1.2.1 is automatically included on every request by WordPress
35 characters long description:
ACF Price field with number format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected261 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File2161661

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
There were not PNG files found in your plugin