83% advanced-custom-fields-viewer

Code Review | Advanced Custom Fields Viewer

WordPress plugin Advanced Custom Fields Viewer scored83%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: 6.3.1
  • 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

200+ active /9,832 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Advanced Custom Fields Viewer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0530.13 ▼9.72
Dashboard /wp-admin3.34 ▲0.0454.22 ▲2.80
Posts /wp-admin/edit.php3.39 ▲0.0455.09 ▲2.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.17 ▼0.31
Media Library /wp-admin/upload.php3.26 ▲0.0438.66 ▼0.47
ACF Viewer /wp-admin/options-general.php?page=advanced-custom-fields-viewer/admin/options.php3.2332.84

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/advanced-custom-fields-viewer/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Advanced Custom Fields Viewer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲10613.56 ▼0.754.37 ▲2.5742.22 ▲0.30
Dashboard /wp-admin2,222 ▲225.77 ▼0.08103.23 ▼2.8140.25 ▼4.15
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0241.72 ▲1.2135.24 ▼1.10
Add New Post /wp-admin/post-new.php1,529 ▼2617.51 ▼0.82638.95 ▲31.4848.28 ▼6.98
Media Library /wp-admin/upload.php1,404 ▲14.23 ▼0.0096.07 ▼5.5443.64 ▲1.30
ACF Viewer /wp-admin/options-general.php?page=advanced-custom-fields-viewer/admin/options.php9162.1624.9231.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-viewer/admin/options.php:15
    • > 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_filter() in wp-content/plugins/advanced-custom-fields-viewer/admin/general.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
Attributes that need to be fixed:
  • Tags: There are too many tags (19 tag instead of maximum 10)
The official readme.txt might help

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

This is the main PHP file of "Advanced Custom Fields Viewer" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same 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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected885 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS39315582
PHP53112212
JavaScript17662
JSON10019
Markdown17010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin