94% advanced-custom-widget

Code Review | Advanced Custom Widget

WordPress plugin Advanced Custom Widget scored 94% from 53 tests.

About plugin

  • Plugin page: advanced-custom-w...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 5.8.1
  • First release: Aug 3, 2018
  • Latest release: May 18, 2019
  • Number of updates: 3
  • Update frequency: every 96.7 days
  • Top authors: longvietweb (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

30+ active / 1,346 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼260.43ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2029.90 ▲9.61
Dashboard /wp-admin3.16 ▲0.1048.18 ▲3.33
Posts /wp-admin/edit.php3.27 ▲0.1644.99 ▼0.20
Add New Post /wp-admin/post-new.php5.52 ▲0.0989.58 ▼1,036.83
Media Library /wp-admin/upload.php3.10 ▲0.0934.07 ▼8.03

Server storage [IO: ▲0.06MB] [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: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,682 ▲10016.25 ▲0.747.33 ▼0.7247.57 ▼1.04
Dashboard /wp-admin2,932 ▲795.89 ▲0.07134.07 ▼1.88106.53 ▲6.04
Posts /wp-admin/edit.php2,708 ▲52.80 ▲0.1265.78 ▼7.3589.60 ▼8.68
Add New Post /wp-admin/post-new.php1,853 ▼18518.85 ▼0.41348.59 ▼22.93110.36 ▲1.83
Media Library /wp-admin/upload.php1,777 ▲54.99 ▼0.00159.63 ▲11.26107.17 ▼7.34

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 shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: widget in wp-content/plugins/advanced-custom-widget/admin/add-advanced-custom-widget-style-form.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_field_id() on null in wp-content/plugins/advanced-custom-widget/admin/add-advanced-custom-widget-style-form.php:14

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


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: widget advanced, widget, customization widget, custom widget, widget options

advanced-custom-widget/advanced-custom-widget.php Passed 13 tests

The principal PHP file in "Advanced Custom Widget" v. 1.0.1 is loaded by WordPress automatically on each request
36 characters long description:
Aggregate and customize all widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin909 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File14550104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

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