78% acf-post-object-field-type-add-on

Code Review | ACF Post Object Field Type Add-on

WordPress plugin ACF Post Object Field Type Add-on scored78%from 54 tests.

About plugin

  • Plugin page: acf-post-object-f...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 22, 2016
  • Latest release: Aug 3, 2023
  • Number of updates: 59
  • Update frequency: every 40.9 days
  • Top authors: davidbaumwald (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼9.93ms] Passed 4 tests

Analyzing server-side resources used by ACF Post Object Field Type Add-on
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0335.41 ▼9.21
Dashboard /wp-admin3.21 ▼0.0936.27 ▼12.22
Posts /wp-admin/edit.php3.28 ▼0.0839.13 ▼8.10
Add New Post /wp-admin/post-new.php5.46 ▼0.4277.83 ▼10.20
Media Library /wp-admin/upload.php3.22 ▼0.0132.83 ▼1.26
ACF Post Object Add-On /wp-admin/options-general.php?page=de_acfpoftao3.0823.95

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
recovery_mode_email_last_sent
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ACF Post Object Field Type Add-on
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.66 ▼0.924.26 ▲1.9639.80 ▼11.57
Dashboard /wp-admin2,210 ▲225.86 ▼0.02111.80 ▼0.3743.21 ▲0.87
Posts /wp-admin/edit.php2,090 ▲12.06 ▲0.0635.30 ▼1.6930.24 ▼4.76
Add New Post /wp-admin/post-new.php1,531 ▼323.17 ▼0.17667.45 ▲4.7852.64 ▼6.77
Media Library /wp-admin/upload.php1,389 ▲44.21 ▼0.0898.84 ▼18.5943.81 ▲0.94
ACF Post Object Add-On /wp-admin/options-general.php?page=de_acfpoftao600.440.129.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=de_acfpoftao
    • > Error in wp-content/plugins/acf-post-object-field-type-add-on/de-acf-post-object-addon.php+182
    Uncaught Error: Call to undefined function acf_get_field_groups() in wp-content/plugins/acf-post-object-field-type-add-on/de-acf-post-object-addon.php:182
    Stack trace:
    #0 wp-content/plugins/acf-post-object-field-type-add-on/de-acf-post-object-addon.php(107): DE_ACF_Post_Object_Addon_Plugin->get_acf_append_field_options()
    #1 wp-includes/class-wp-hook.php(310): DE_ACF_Post_Object_Addon_Plugin->option_page_assets()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin-header.php(139): do_action()
    #5 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=de_acfpoftao
    • > Network (severe)
    wp-admin/options-general.php?page=de_acfpoftao - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: acf, post object field type, acf post object, acf post title

acf-post-object-field-type-add-on/de-acf-post-object-addon.php 85% from 13 tests

This is the main PHP file of "ACF Post Object Field Type Add-on" version 2.1.0, 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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acf-post-object-field-type-add-on.php" instead of "de-acf-post-object-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected490 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15910238
CSS180114
PO File1212375
JavaScript1104963

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin