89% advanced-custom-data

Code Review | Advanced Custom Data

WordPress plugin Advanced Custom Data scored89%from 54 tests.

About plugin

  • Plugin page: advanced-custom-data
  • Plugin version: 1.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2021
  • Latest release: Nov 18, 2023
  • Number of updates: 416
  • Update frequency: every 1.8 days
  • Top authors: adsvui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,962 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.19ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Data
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.54 ▼7.89
Dashboard /wp-admin3.38 ▲0.0843.46 ▼2.43
Posts /wp-admin/edit.php3.43 ▲0.0750.23 ▲3.23
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.60 ▲2.33
Media Library /wp-admin/upload.php3.30 ▲0.0736.43 ▲4.43
Add New /wp-admin/post-new.php?post_type=acd-data3.3645.51
All Data /wp-admin/edit.php?post_type=acd-data3.3433.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Data
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3414.22 ▼0.171.59 ▼0.4038.42 ▼5.62
Dashboard /wp-admin2,226 ▲585.60 ▲0.0689.88 ▼7.7137.78 ▼7.74
Posts /wp-admin/edit.php2,131 ▲281.95 ▼0.0639.36 ▼2.4935.34 ▼1.96
Add New Post /wp-admin/post-new.php1,557 ▲3122.91 ▲0.11592.25 ▲2.8652.29 ▼3.58
Media Library /wp-admin/upload.php1,431 ▲314.18 ▲0.0098.56 ▼1.1041.10 ▲0.18
Add New /wp-admin/post-new.php?post_type=acd-data1,8843.5373.8634.08
All Data /wp-admin/edit.php?post_type=acd-data1,0951.9338.8232.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: advanced custom fields, advanced custom data, custom data, contact form 7

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

The main PHP file in "Advanced Custom Data" ver. 1.0.13 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-custom-data.php" instead of "acd.php")

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
Everything looks great! No dangerous files found in this plugin358 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP386137358

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected