84% acf-single-relationship-add-new

Code Review | ACF Single Relationship Add New

WordPress plugin ACF Single Relationship Add New scored84%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: 6.3.1
  • 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

50+ active /2,206 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.37ms] Passed 4 tests

A check of server-side resources used by ACF Single Relationship Add New
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.76 ▼5.44
Dashboard /wp-admin3.32 ▼0.0352.12 ▼5.98
Posts /wp-admin/edit.php3.37 ▲0.0144.48 ▼3.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.49 ▼14.07
Media Library /wp-admin/upload.php3.24 ▲0.0131.45 ▼3.35

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

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Single Relationship Add New
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.18 ▼1.341.95 ▲0.0744.64 ▼0.63
Dashboard /wp-admin2,206 ▲184.85 ▼1.05124.23 ▲12.9552.71 ▲10.27
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0036.01 ▼9.3731.70 ▼5.35
Add New Post /wp-admin/post-new.php1,557 ▲3718.28 ▼4.86599.66 ▼13.2660.03 ▲9.16
Media Library /wp-admin/upload.php1,388 ▲64.23 ▲0.0395.59 ▼6.3544.03 ▲3.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #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.)
Please take inspiration from this readme.txt

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

The principal PHP file in "ACF Single Relationship Add New" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 205 characters long)

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

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/border.png0.16KB0.16KB0.00%
css/images/controls.png1.99KB2.04KB0.00%
css/images/loading_background.png0.16KB0.15KB▼ 6.02%