88% acf-php-vars

Code Review | ACF PHP VARS

WordPress plugin ACF PHP VARS scored 88% from 54 tests.

About plugin

  • Plugin page: acf-php-vars
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 5.9.2
  • First release: Mar 24, 2016
  • Latest release: Oct 4, 2018
  • Number of updates: 24
  • Update frequency: every 38.5 days
  • Top authors: samjco (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active / 2,135 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by ACF PHP VARS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0154.75 ▲4.40
Dashboard /wp-admin3.45 ▲0.0136.48 ▲3.30
Posts /wp-admin/edit.php3.68 ▲0.0140.03 ▲3.23
Add New Post /wp-admin/post-new.php6.93 ▼0.0897.22 ▼1,158.82
Media Library /wp-admin/upload.php3.33 ▼0.0025.82 ▼3.21

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

ACF PHP VARS: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,808 ▲6615.97 ▼0.086.47 ▲0.682.14 ▼0.09
Dashboard /wp-admin2,911 ▲536.14 ▼0.03120.47 ▼11.70155.54 ▼8.67
Posts /wp-admin/edit.php2,708 ▲143.25 ▲0.0166.67 ▲1.88142.77 ▲2.39
Add New Post /wp-admin/post-new.php1,729 ▲6821.11 ▲4.96450.20 ▲31.30154.47 ▲0.58
Media Library /wp-admin/upload.php1,717 ▲225.57 ▲0.07153.94 ▲5.06186.95 ▼10.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/acf-php-vars/inc/acf-examples.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 16
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/acf-php-vars/acf-php-vars.php:18
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 3
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 36
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 16
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 36
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 2
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 36
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Fields vars displayed.), #2 (Fields vars showing as Keys.), #3 (Example code displayed.)
You can take inspiration from this readme.txt

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

"ACF PHP VARS" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
123 characters long description:
Addon to ACF/ACF PRO that allows developers to copy/paste all created field variables of field groups to their theme files.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin551 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP310457301
JavaScript551209220
CSS11115
Markdown111015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/icons/list-fields.png1.28KB0.62KB▼ 51.60%
css/icons/sm-acf-logo.png0.65KB0.70KB0.00%