90% advanced-custom-fields-widget-area-field

Code Review | Advanced Custom Fields: Widget Area Field

WordPress plugin Advanced Custom Fields: Widget Area Field scored90%from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 6.3.1
  • First release: Aug 23, 2013
  • Latest release: Oct 12, 2014
  • Number of updates: 4
  • Update frequency: every 103.8 days
  • Top authors: dustyf (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /11,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Advanced Custom Fields: Widget Area Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.32 ▲0.74
Dashboard /wp-admin3.31 ▲0.0048.88 ▼4.63
Posts /wp-admin/edit.php3.36 ▲0.0050.89 ▼4.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.10 ▼14.18
Media Library /wp-admin/upload.php3.23 ▲0.0040.57 ▲0.83

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Widget Area Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.001.72 ▼0.1245.49 ▲1.41
Dashboard /wp-admin2,198 ▲245.65 ▲0.0390.25 ▼1.3940.14 ▼2.03
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0040.00 ▼0.3036.24 ▲2.70
Add New Post /wp-admin/post-new.php1,526 ▼223.79 ▲0.65675.37 ▲3.9950.84 ▼5.59
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0597.64 ▼10.8545.67 ▲0.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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 | 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 shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: sidebars, widget areas, widgets, custom fields, acf...

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

The primary PHP file in "Advanced Custom Fields: Widget Area Field" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-custom-fields-widget-area-field.php" instead of "acf-widget-area.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 plugin214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP399152214

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.33
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.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

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