94% acf-sidebar-selector-field

Code Review | ACF: Sidebar Selector

WordPress plugin ACF: Sidebar Selector scored 94% from 54 tests.

About plugin

  • Plugin page: acf-sidebar-selec...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2
  • WordPress version: 5.9.2
  • First release: Feb 16, 2014
  • Latest release: Apr 22, 2015
  • Number of updates: 12
  • Update frequency: every 35.8 days
  • Top authors: danielpataki (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active / 9,210 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by ACF: Sidebar Selector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.99 ▲3.74
Dashboard /wp-admin3.41 ▲0.0133.22 ▼0.25
Posts /wp-admin/edit.php3.65 ▲0.0138.96 ▲2.13
Add New Post /wp-admin/post-new.php6.92 ▼0.0896.07 ▼1,178.60
Media Library /wp-admin/upload.php3.30 ▼0.0025.94 ▼3.21

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ACF: Sidebar Selector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.23 ▲0.566.55 ▲0.322.38 ▼0.06
Dashboard /wp-admin2,895 ▲376.14 ▼0.04115.89 ▼19.02159.28 ▲0.46
Posts /wp-admin/edit.php2,694 ▲63.24 ▲0.0165.31 ▲2.00138.32 ▼2.85
Add New Post /wp-admin/post-new.php1,696 ▲3521.13 ▲3.85444.33 ▲25.25155.97 ▼6.30
Media Library /wp-admin/upload.php1,695 ▼05.53 ▲0.07137.83 ▼4.33188.45 ▼4.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-sidebar-selector-field/acf-sidebar_selector-v4.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-sidebar-selector-field/acf-sidebar_selector.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-sidebar-selector-field/acf-sidebar_selector-v5.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: custom fields, acf, sidebar

acf-sidebar-selector-field/acf-sidebar_selector.php 92% from 13 tests

The main PHP file in "ACF: Sidebar Selector" ver. 3.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: Please rename the main PHP file in this plugin to the plugin slug ("acf-sidebar-selector-field.php" instead of "acf-sidebar_selector.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 plugin176 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP365147145
PO File18831

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin