90% post-2-post-for-acf

Code Review | ACF Post-2-Post

WordPress plugin ACF Post-2-Post scored90%from 54 tests.

About plugin

  • Plugin page: post-2-post-for-acf
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Jul 11, 2023
  • Number of updates: 30
  • Update frequency: every 79.4 days
  • Top authors: Hube2 (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

4,000+ active /50,477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by ACF Post-2-Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.06 ▼3.60
Dashboard /wp-admin3.31 ▼0.0443.07 ▼12.94
Posts /wp-admin/edit.php3.36 ▲0.0043.45 ▼1.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.77 ▼6.97
Media Library /wp-admin/upload.php3.23 ▲0.0036.27 ▲1.41

Server storage [IO: ▲0.02MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for ACF Post-2-Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.151.53 ▼0.3537.90 ▼8.72
Dashboard /wp-admin2,203 ▲185.80 ▲0.9099.96 ▼12.2437.18 ▼6.94
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0639.13 ▼1.9635.28 ▼3.34
Add New Post /wp-admin/post-new.php1,533 ▲1423.29 ▼0.03656.93 ▼35.4161.52 ▲9.39
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.1093.88 ▼13.0342.00 ▼4.65

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: add on, two way, 2 way, advanced custom fields, bidirectional...

post-2-post-for-acf/acf-post2post.php 92% from 13 tests

The entry point to "ACF Post-2-Post" version 1.7.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-2-post-for-acf.php" instead of "acf-post2post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected255 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11828228
JSON11027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity6.30
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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