78% acf-php-vars

Code Review | ACF PHP VARS

WordPress plugin ACF PHP VARS scored78%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: 6.3.1
  • 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,421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.79ms] Passed 4 tests

An overview of server-side resources used by ACF PHP VARS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.82 ▲1.61
Dashboard /wp-admin3.32 ▲0.0146.19 ▼3.42
Posts /wp-admin/edit.php3.37 ▲0.0143.97 ▲0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.52 ▼11.75
Media Library /wp-admin/upload.php3.24 ▲0.0132.94 ▼0.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF PHP VARS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.42 ▲0.071.70 ▼0.0444.52 ▲0.64
Dashboard /wp-admin2,203 ▲235.57 ▼0.0396.59 ▲2.0145.49 ▼0.34
Posts /wp-admin/edit.php2,108 ▲81.97 ▲0.0235.64 ▲1.9135.69 ▼3.30
Add New Post /wp-admin/post-new.php1,537 ▲1123.82 ▲0.72667.75 ▼9.7362.24 ▲5.37
Media Library /wp-admin/upload.php1,411 ▲84.29 ▲0.1198.90 ▼1.3843.09 ▼8.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with 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 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 2
    • > 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 16
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 3
    • > 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 36
    • > PHP Notice
      Undefined variable: acf_field_TYPE in wp-content/plugins/acf-php-vars/inc/acf-examples.php on line 36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Fields vars displayed.), #2 (Fields vars showing as Keys.), #3 (Example code displayed.)
The official readme.txt might help

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 a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected551 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP310457301
JavaScript551209220
CSS11115
Markdown111015

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.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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/sm-acf-logo.png0.65KB0.70KB0.00%
css/icons/list-fields.png1.28KB0.62KB▼ 51.60%