83% webcom-operator-status

Code Review | Webcom Operator Status

WordPress plugin Webcom Operator Status scored83%from 54 tests.

About plugin

  • Plugin page: webcom-operator-s...
  • Plugin version: 0.4.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.5
  • WordPress version: 6.3.1
  • First release: May 2, 2023
  • Latest release: Nov 27, 2023
  • Number of updates: 13
  • Update frequency: every 16.4 days
  • Top authors: webcomtlc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Webcom Operator Status
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.95 ▼0.75
Dashboard /wp-admin3.36 ▲0.0144.88 ▼19.10
Posts /wp-admin/edit.php3.41 ▲0.0546.33 ▼5.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.60 ▼7.82
Media Library /wp-admin/upload.php3.28 ▲0.0541.71 ▲8.71
WEBCOM TLC - Stato degli Operatori /wp-admin/options-general.php?page=webcom-operator-status-settings3.2532.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Webcom Operator Status: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7514.27 ▲0.101.89 ▲0.2941.81 ▼1.09
Dashboard /wp-admin2,199 ▲245.59 ▼0.1092.41 ▼10.0540.19 ▼0.03
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0438.82 ▼1.8435.67 ▼1.76
Add New Post /wp-admin/post-new.php1,698 ▲17222.01 ▼1.21619.20 ▼79.3843.72 ▼15.56
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.0998.86 ▲3.0341.62 ▲0.16
WEBCOM TLC - Stato degli Operatori /wp-admin/options-general.php?page=webcom-operator-status-settings9392.0022.8826.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webcom-operator-status/webcom-plugin.php:28

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

Optimizations

Plugin configuration 90% 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:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt might help

webcom-operator-status/webcom-plugin.php 85% from 13 tests

The main PHP script in "Webcom Operator Status" version 0.4.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("webcom-operator-status.php" instead of "webcom-plugin.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin404 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP33330228
JavaScript200147
JSON10017
Markdown16010
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 compressed PNG files occupy 0.19MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
build/images/OCCUPATO.c63d5b41.png41.63KB40.05KB▼ 3.80%
build/images/LOGOUT.99a185f5.png66.89KB41.67KB▼ 37.71%
build/images/LIBERO.805064eb.png40.83KB41.85KB0.00%
build/images/PAUSA.10c5965f.png40.79KB41.85KB0.00%