72% salonde-widget

Code Review | salon.de widget

WordPress plugin salon.de widget scored72%from 54 tests.

About plugin

  • Plugin page: salonde-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 21, 2016
  • Latest release: Jan 21, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: salon.de (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.71ms] Passed 4 tests

Analyzing server-side resources used by salon.de widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.23 ▲3.69
Dashboard /wp-admin3.35 ▲0.0545.95 ▼3.07
Posts /wp-admin/edit.php3.40 ▲0.0443.84 ▼2.85
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.38 ▼3.98
Media Library /wp-admin/upload.php3.27 ▲0.0434.30 ▲3.07
salon.de widget /wp-admin/options-general.php?page=salon_settings_page3.4027.27

Server storage [IO: ▲0.08MB] [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: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for salon.de widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.61 ▼0.691.80 ▼0.0943.93 ▼0.69
Dashboard /wp-admin2,229 ▲414.99 ▲0.07108.47 ▼2.1940.55 ▼1.98
Posts /wp-admin/edit.php2,117 ▲282.30 ▲0.2635.39 ▼6.1132.32 ▼2.41
Add New Post /wp-admin/post-new.php1,531 ▼223.25 ▲0.01638.65 ▼19.3634.37 ▼15.33
Media Library /wp-admin/upload.php1,414 ▲234.40 ▲0.18101.57 ▲1.9244.35 ▲1.83
salon.de widget /wp-admin/options-general.php?page=salon_settings_page7001.179.6221.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=salon_settings_page
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/salonde-widget/templates/settings.php on line 51 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/salonde-widget/templates/settings.php(51): do_settings_fields()
    #1 wp-content/plugins/salonde-widget/salon.de-widget.php(166): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): salon_widget_plugin->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/salonde-widget/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/salonde-widget/salon.de-widget.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/salonde-widget/templates/shortcodes.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=salon_settings_page
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).wpColorPicker is not a function" "TypeError: jQuery(...).wpColorPicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=salon_settings_page:157:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=salon_settings_page
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).wpColorPicker is not a function

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Invalid url: ""
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

salonde-widget/salon.de-widget.php 92% from 13 tests

The entry point to "salon.de widget" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("salonde-widget.php" instead of "salon.de-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin862 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32498750
CSS13390
JavaScript10022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/salon.de-icon.png0.50KB0.63KB0.00%
img/salon.de-logo.png10.28KB6.12KB▼ 40.53%