83% userway-accessibility-widget

Code Review | Accessibility by UserWay

WordPress plugin Accessibility by UserWay scored83%from 54 tests.

About plugin

  • Plugin page: userway-accessibi...
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2017
  • Latest release: Feb 13, 2023
  • Number of updates: 102
  • Update frequency: every 21.7 days
  • Top authors: userwayorg (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

70,000+ active /414,102 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.83ms] Passed 4 tests

Server-side resources used by Accessibility by UserWay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.12729.85 ▲687.28
Dashboard /wp-admin3.35 ▲0.0446.02 ▼1.06
Posts /wp-admin/edit.php3.46 ▲0.1050.17 ▲1.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.10 ▼3.85
Media Library /wp-admin/upload.php3.27 ▲0.0435.46 ▼4.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_userway
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Accessibility by UserWay: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4914.40 ▲0.021.87 ▼0.4358.59 ▲15.47
Dashboard /wp-admin2,222 ▲344.87 ▼1.01111.22 ▼1.8144.43 ▲1.15
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0142.38 ▲5.7535.83 ▲2.88
Add New Post /wp-admin/post-new.php1,527 ▲517.66 ▼5.62644.62 ▼116.2556.13 ▼3.43
Media Library /wp-admin/upload.php1,407 ▲224.19 ▲0.06102.96 ▼11.2645.35 ▼10.02

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'USW_USERWAY_DIRincludes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/userway-accessibility-widget/includes/admin.php on line 9
    • > PHP Warning
      Use of undefined constant USW_USERWAY_DIR - assumed 'USW_USERWAY_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/userway-accessibility-widget/includes/admin.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/userway-accessibility-widget/includes/controller.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/userway-accessibility-widget/userway.php:15
    • > PHP Warning
      require_once(USW_USERWAY_DIRincludes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/userway-accessibility-widget/includes/admin.php on line 9

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #3, #4, #5, #6, #7, #8 in userway-accessibility-widget/assets to your readme.txt
Please take inspiration from this readme.txt

userway-accessibility-widget/userway.php 85% from 13 tests

The primary PHP file in "Accessibility by UserWay" version 2.5.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("userway-accessibility-widget.php" instead of "userway.php")
  • Description: The description should be shorter than 140 characters (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin319 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47664311
XML1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin