90% advanced-custom-fields-sites-field

Code Review | Advanced Custom Fields: Sites Field

WordPress plugin Advanced Custom Fields: Sites Field scored 90% 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: 6.3.1
  • 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

100+ active / 2,572 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼0.79ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Custom Fields: Sites Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.48 ▼3.15
Dashboard /wp-admin3.31 ▲0.0146.83 ▼2.62
Posts /wp-admin/edit.php3.36 ▲0.0146.56 ▲1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.66 ▲1.81
Media Library /wp-admin/upload.php3.24 ▲0.0134.56 ▲0.96

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Sites Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.80 ▲0.431.64 ▼0.0639.22 ▼18.06
Dashboard /wp-admin2,206 ▲154.80 ▼0.11109.63 ▼7.7440.16 ▼9.04
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0140.61 ▲2.7335.75 ▲2.31
Add New Post /wp-admin/post-new.php1,544 ▲218.45 ▲0.31618.38 ▲12.0559.82 ▼0.06
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.0498.77 ▼4.6442.18 ▼0.55

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP 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: blogs, sites, relational sites, multisite, network...

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

The main PHP file in "Advanced Custom Fields: Sites Field" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file 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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin662 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3183292521
PO File1363793
JavaScript1263129
Markdown211019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected