62% salon-manager-widgets

Code Review | Salon Manager Widgets

WordPress plugin Salon Manager Widgets scored62%from 54 tests.

About plugin

  • Plugin page: salon-manager-wid...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Oct 21, 2021
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: salonmanager (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.19MB] [CPU: ▼44.18ms] Passed 4 tests

An overview of server-side resources used by Salon Manager Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6815.90 ▼26.84
Dashboard /wp-admin2.82 ▼0.4817.93 ▼35.59
Posts /wp-admin/edit.php2.82 ▼0.5417.49 ▼30.80
Add New Post /wp-admin/post-new.php2.82 ▼3.0718.26 ▼83.48
Media Library /wp-admin/upload.php2.82 ▼0.4116.28 ▼18.37
Salon Widget Setting /wp-admin/options-general.php?page=salon-manager-widget2.8215.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Salon Manager Widgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲23314.16 ▼0.519.75 ▲7.8540.56 ▼3.52
Dashboard /wp-admin2,227 ▲355.10 ▲0.07107.42 ▼3.1340.51 ▼6.48
Posts /wp-admin/edit.php2,110 ▲182.20 ▲0.1945.02 ▲3.2635.69 ▼3.91
Add New Post /wp-admin/post-new.php1,368 ▼14617.30 ▼0.28525.35 ▼131.6038.83 ▼31.24
Media Library /wp-admin/upload.php1,409 ▲214.43 ▲0.22105.95 ▼0.2346.84 ▲1.20
Salon Widget Setting /wp-admin/options-general.php?page=salon-manager-widget8264.2797.7833.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/salon-manager-widgets/salon-manager-widget.php+80
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=salon-manager-widget
    • > Notice in wp-content/plugins/salon-manager-widgets/salon-manager-widget.php+89
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=salon-manager-widget
    • > Notice in wp-content/plugins/salon-manager-widgets/salon-manager-widget.php+82
    Undefined variable: deps
    • > GET request to /wp-admin/options-general.php?page=salon-manager-widget
    • > Notice in wp-content/plugins/salon-manager-widgets/salon-manager-widget.php+82
    Undefined variable: ver

SRP 0% 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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/salon-manager-widgets/public/partials/salon-manager-widget-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/salon-manager-widgets/admin/partials/salon-manager-widget-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === salon-manager-widgets === )
You can look at the official readme.txt

salon-manager-widgets/salon-manager-widget.php 77% from 13 tests

The main PHP file in "Salon Manager Widgets" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("salon-manager-widgets.php" instead of "salon-manager-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected273 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12147582254
CSS24813
JavaScript24546

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin