94% advanced-custom-data

Code Review | Advanced Custom Data

WordPress plugin Advanced Custom Data scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-data
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 25, 2021
  • Latest release: Mar 29, 2022
  • Number of updates: 121
  • Update frequency: every 1.3 days
  • Top authors: adsvui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 689 total downloads


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.04MB] [CPU: ▼295.74ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Data
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0452.99 ▲0.79
Dashboard /wp-admin3.49 ▲0.0834.91 ▼1.66
Posts /wp-admin/edit.php3.71 ▲0.0738.05 ▲2.35
Add New Post /wp-admin/post-new.php6.95 ▼0.0295.21 ▼1,183.05
Media Library /wp-admin/upload.php3.37 ▲0.0726.95 ▲0.96
All Data /wp-admin/edit.php?post_type=acd-data3.4126.72
Add New /wp-admin/post-new.php?post_type=acd-data3.6642.23

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Data: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲8116.01 ▲0.435.67 ▼0.302.13 ▲0.01
Dashboard /wp-admin2,934 ▲766.17 ▲0.02115.70 ▼21.93154.37 ▼8.73
Posts /wp-admin/edit.php2,725 ▲343.24 ▲0.0165.01 ▼2.61141.52 ▼16.94
Add New Post /wp-admin/post-new.php1,715 ▲2521.25 ▲0.66447.92 ▲2.04154.33 ▼1.45
Media Library /wp-admin/upload.php1,741 ▲465.51 ▲0.05141.31 ▼14.51190.22 ▲0.61
All Data /wp-admin/edit.php?post_type=acd-data1,4033.1659.41110.99
Add New /wp-admin/post-new.php?post_type=acd-data2,5285.5994.49158.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-data/includes/custom-post.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: contact form 7, custom data, advanced custom fields, advanced custom data

advanced-custom-data/acd.php 85% from 13 tests

The entry point to "Advanced Custom Data" version 1.0.7 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-data.php" instead of "acd.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin356 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions12100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin