94% acf-single-relationship-add-new

Code Review | ACF Single Relationship Add New

WordPress plugin ACF Single Relationship Add New scored 94% from 54 tests.

About plugin

  • Plugin page: acf-single-relati...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.5
  • WordPress version: 5.9.2
  • First release: Nov 14, 2012
  • Latest release: Jan 23, 2013
  • Number of updates: 13
  • Update frequency: every 5.4 days
  • Top authors: fancyfiber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,906 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.01MB] [CPU: ▼298.04ms] Passed 4 tests

Analyzing server-side resources used by ACF Single Relationship Add New
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0253.79 ▲4.32
Dashboard /wp-admin3.42 ▲0.0233.35 ▼0.75
Posts /wp-admin/edit.php3.66 ▲0.0237.68 ▲0.42
Add New Post /wp-admin/post-new.php6.91 ▼0.06104.28 ▼1,185.44
Media Library /wp-admin/upload.php3.31 ▲0.0122.98 ▼6.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ACF Single Relationship Add New
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4116.18 ▲0.165.84 ▲0.182.30 ▲0.29
Dashboard /wp-admin2,895 ▲416.14 ▼0.13117.62 ▼18.48155.60 ▼1.43
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0161.74 ▼0.90136.58 ▼4.97
Add New Post /wp-admin/post-new.php1,708 ▼1119.39 ▲2.16403.66 ▼7.90155.74 ▼2.26
Media Library /wp-admin/upload.php1,698 ▲35.45 ▼0.06142.50 ▼9.01187.55 ▼18.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× 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/acf-single-relationship-add-new/acf-single-relationship-add-new.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Shows the new Add New button on a relationship field), #2 (Clicking the Add New button opens the Colorbox with the limited features. Clicking the publish button will post the new item and close the Colorbox.)
The official readme.txt is a good inspiration

acf-single-relationship-add-new/acf-single-relationship-add-new.php 92% from 13 tests

Analyzing the main PHP file in "ACF Single Relationship Add New" version 1.2
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 205 characters long)

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
There were no executable files found in this plugin137 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/loading_background.png0.16KB0.15KB▼ 6.02%