94% advanced-custom-fields-viewer

Code Review | Advanced Custom Fields Viewer

WordPress plugin Advanced Custom Fields Viewer scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.9
  • WordPress version: 5.9.2
  • First release: Mar 26, 2015
  • Latest release: Nov 13, 2017
  • Number of updates: 18
  • Update frequency: every 53.6 days
  • Top authors: JoeFusco (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 9,258 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.03MB] [CPU: ▼289.79ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields Viewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0447.94 ▼3.68
Dashboard /wp-admin3.42 ▲0.0132.27 ▼1.57
Posts /wp-admin/edit.php3.65 ▲0.0135.29 ▼2.73
Add New Post /wp-admin/post-new.php6.89 ▼0.08106.59 ▼1,150.44
Media Library /wp-admin/upload.php3.30 ▲0.0025.68 ▼2.29
ACF Viewer /wp-admin/options-general.php?page=advanced-custom-fields-viewer/admin/options.php3.2722.28

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Fields Viewer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,886 ▲13216.22 ▲0.198.86 ▲3.1118.25 ▲15.58
Dashboard /wp-admin2,897 ▲396.12 ▼0.05119.02 ▼9.85154.79 ▼2.14
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0162.14 ▼2.63135.31 ▼8.12
Add New Post /wp-admin/post-new.php1,714 ▲5320.67 ▲3.96447.68 ▲30.08157.60 ▼6.33
Media Library /wp-admin/upload.php1,703 ▲55.57 ▲0.08142.56 ▼9.11186.94 ▼7.32
ACF Viewer /wp-admin/options-general.php?page=advanced-custom-fields-viewer/admin/options.php1,1822.4355.05133.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-custom-fields-viewer/admin/general.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-viewer/viewer.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-viewer/admin/options.php:15

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
You can take inspiration from this readme.txt

advanced-custom-fields-viewer/acfv.php 92% from 13 tests

The main PHP script in "Advanced Custom Fields Viewer" version 1.2.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-custom-fields-viewer.php" instead of "acfv.php")

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
Success! There were no dangerous files found in this plugin885 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS39315582
PHP53112212
JavaScript17662
JSON10019
Markdown17010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions7
▷ Named functions7100.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
No PNG files were detected