78% system-usability-scale

Code Review | System Usability Scale

WordPress plugin System Usability Scale scored78%from 54 tests.

About plugin

  • Plugin page: system-usability-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Nov 16, 2021
  • Latest release: Nov 18, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: gparrotta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by System Usability Scale
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.19 ▼3.85
Dashboard /wp-admin3.33 ▲0.0344.76 ▼5.24
Posts /wp-admin/edit.php3.38 ▲0.0346.31 ▲3.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.68 ▼5.81
Media Library /wp-admin/upload.php3.25 ▲0.0235.35 ▲3.08

Server storage [IO: ▲0.10MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: 2 new tables, 10 new options
New tables
wp_plugin_suscale_systems
wp_plugin_suscale
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
suscale_results_page_id
suscale_questionnaire_page_id
widget_recent-comments
suscale_page_created
suscale_pages
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for System Usability Scale
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.47 ▲0.101.75 ▲0.1341.42 ▼3.90
Dashboard /wp-admin2,222 ▲345.86 ▲0.82109.30 ▲3.5741.52 ▼1.23
Posts /wp-admin/edit.php2,108 ▲192.02 ▲0.0338.89 ▲3.6234.36 ▼2.01
Add New Post /wp-admin/post-new.php1,541 ▲2723.26 ▲5.53627.38 ▼5.8766.55 ▲9.67
Media Library /wp-admin/upload.php1,404 ▲134.23 ▼0.1098.88 ▲0.7743.72 ▼1.32

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/system-usability-scale/suscale.php
  • 5× 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/system-usability-scale/server/suscale_actions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/system-usability-scale/suscale_core.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/system-usability-scale/admin/suscale_settings_page.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/system-usability-scale/suscale_init.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/system-usability-scale/suscale_loads.php:51

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: system, usability, sus, scale

system-usability-scale/suscale.php 85% from 13 tests

This is the main PHP file of "System Usability Scale" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 526 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("system-usability-scale.php" instead of "suscale.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,181 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP815865818
JavaScript5434481
CSS6805347
Markdown1800320
HTML330215

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.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