10% advanced-widgets

Code Review | Advanced Widgets

WordPress plugin Advanced Widgets scored10%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: 6.3.1
  • 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

100+ active /7,069 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • 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: ▼1.85MB] [CPU: ▼51.97ms] Passed 4 tests

An overview of server-side resources used by Advanced Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.60 ▼36.88
Dashboard /wp-admin2.16 ▼1.156.16 ▼41.54
Posts /wp-admin/edit.php2.16 ▼1.207.88 ▼38.12
Add New Post /wp-admin/post-new.php2.16 ▼3.735.98 ▼91.35
Media Library /wp-admin/upload.php2.16 ▼1.074.94 ▼30.72
Advanced Widgets /wp-admin/options-general.php?page=advanced-widgets2.166.43

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▼0.271.72 ▼0.0847.53 ▼5.86
Dashboard /wp-admin2,210 ▲225.90 ▼0.10103.86 ▼0.6138.03 ▼0.89
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0340.03 ▲0.7534.15 ▼0.99
Add New Post /wp-admin/post-new.php1,517 ▼217.86 ▼5.42645.49 ▼29.8054.13 ▲2.12
Media Library /wp-admin/upload.php1,386 ▼24.26 ▼0.0097.75 ▼8.7342.07 ▼3.99
Advanced Widgets /wp-admin/options-general.php?page=advanced-widgets9092.0227.8329.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > 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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > 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 | 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
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-widgets/advanced-widgets.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-widgets/aw_configurar.php:1
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-widgets/aw_ajustes.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate 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 might help

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

Analyzing the main PHP file in "Advanced Widgets" version 1.2
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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this 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

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued 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

PNG files should be compressed to save space and minimize bandwidth usage
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-2.png58.22KB23.59KB▼ 59.47%
assets/screenshot-1.png46.00KB21.02KB▼ 54.31%