10% advanced-widgets

Code Review | Advanced Widgets

WordPress plugin Advanced Widgets scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-widgets
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.1
  • WordPress version: 5.9.2
  • First release: Mar 24, 2014
  • Latest release: Jan 13, 2015
  • Number of updates: 32
  • Update frequency: every 9.3 days
  • Top authors: Andrico (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 6,760 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/advanced-widgets/advanced-widgets.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedWidgets has a deprecated constructor

Server metrics [RAM: ▼2.42MB] [CPU: ▼379.33ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.95 ▼1.564.05 ▼60.28
Dashboard /wp-admin1.97 ▼1.443.82 ▼29.46
Posts /wp-admin/edit.php1.97 ▼1.674.17 ▼32.47
Add New Post /wp-admin/post-new.php1.97 ▼5.003.66 ▼1,395.10
Media Library /wp-admin/upload.php1.97 ▼1.324.48 ▼20.03
Advanced Widgets /wp-admin/options-general.php?page=advanced-widgets1.974.07

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲4615.91 ▲0.265.90 ▼0.952.24 ▼0.24
Dashboard /wp-admin2,907 ▲426.14 ▲0.05153.48 ▼27.29162.34 ▼9.03
Posts /wp-admin/edit.php2,690 ▼13.23 ▼0.0162.50 ▲0.83202.72 ▲9.45
Add New Post /wp-admin/post-new.php1,720 ▲5921.84 ▲4.58461.87 ▲57.73174.35 ▲18.00
Media Library /wp-admin/upload.php1,703 ▲55.54 ▲0.00143.46 ▼1.59188.02 ▼13.90
Advanced Widgets /wp-admin/options-general.php?page=advanced-widgets1,1642.4062.51177.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/advanced-widgets/advanced-widgets.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedWidgets has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=advanced-widgets
    • > Deprecated in wp-content/plugins/advanced-widgets/advanced-widgets.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedWidgets has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=advanced-widgets
    • > Warning in wp-content/plugins/advanced-widgets/advanced-widgets.php+13
    Use of undefined constant AW_URL - assumed 'AW_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=advanced-widgets
    • > Warning in wp-content/plugins/advanced-widgets/advanced-widgets.php+14
    Use of undefined constant AW_JS - assumed 'AW_JS' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=advanced-widgets
    • > Warning in wp-content/plugins/advanced-widgets/advanced-widgets.php+15
    Use of undefined constant AW_IMG - assumed 'AW_IMG' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=advanced-widgets
    • > Warning in wp-content/plugins/advanced-widgets/advanced-widgets.php+16
    Use of undefined constant AW_CSS - assumed 'AW_CSS' (this will throw an Error in a future version of PHP)

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-widgets/aw_ajustes.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-widgets/aw_configurar.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-widgets/advanced-widgets.php:13
    • > PHP Warning
      Use of undefined constant AW_URL - assumed 'AW_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-widgets/advanced-widgets.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
The official readme.txt is a good inspiration

advanced-widgets/advanced-widgets.php Passed 13 tests

The primary PHP file in "Advanced Widgets" version 1.2 is used by WordPress to initiate all plugin functionality
127 characters long description:
Agrega widgets en tus sidebars y luego elije donde se van a mostrar! Nunca fue más fácil personalizar la sección de 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
Everything looks great! No dangerous files found in this plugin463 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32514317
PO File1366173
JavaScript10051
CSS10022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity80.00
▷ Minimum class complexity80.00
▷ Maximum class complexity80.00
Average method complexity6.27
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png46.00KB21.02KB▼ 54.31%
assets/screenshot-2.png58.22KB23.59KB▼ 59.47%