100% advanced-custom-fields-sites-field

Code Review | Advanced Custom Fields: Sites Field

WordPress plugin Advanced Custom Fields: Sites Field scored 100% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 5.9.2
  • First release: Oct 2, 2014
  • Latest release: Oct 8, 2016
  • Number of updates: 10
  • Update frequency: every 73.7 days
  • Top authors: tigerton (90%)Jonathandejong (20%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 2,059 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
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼296.16ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: Sites Field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.22 ▲3.55
Dashboard /wp-admin3.41 ▲0.0131.41 ▼1.00
Posts /wp-admin/edit.php3.65 ▲0.0135.33 ▼1.71
Add New Post /wp-admin/post-new.php6.91 ▼0.0893.85 ▼1,185.02
Media Library /wp-admin/upload.php3.30 ▲0.0125.43 ▲3.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Sites Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲3915.82 ▲0.085.69 ▼0.182.22 ▲0.18
Dashboard /wp-admin2,892 ▲316.15 ▼0.02116.71 ▼12.95154.75 ▼7.04
Posts /wp-admin/edit.php2,688 ▼33.24 ▼0.0063.20 ▲0.97139.11 ▼4.21
Add New Post /wp-admin/post-new.php1,752 ▲9121.57 ▲4.99433.93 ▲44.20145.77 ▼10.40
Media Library /wp-admin/upload.php1,695 ▼05.54 ▼0.01147.29 ▲7.32183.67 ▲4.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: blogs, acf, relational sites, sites, multisite...

advanced-custom-fields-sites-field/acf-sites.php 92% from 13 tests

This is the main PHP file of "Advanced Custom Fields: Sites Field" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-custom-fields-sites-field.php" instead of "acf-sites.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
Everything looks great! No dangerous files found in this plugin662 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File1363793

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.67
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
There were not PNG files found in your plugin