84% on-screen-keyboard

Code Review | Onscreen Keyboard

WordPress plugin Onscreen Keyboard scored84%from 54 tests.

About plugin

  • Plugin page: on-screen-keyboard
  • Plugin version: 1.3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Nov 14, 2023
  • Number of updates: 28
  • Update frequency: every 114.4 days
  • Top authors: kk71 (75%)iainredmill (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by Onscreen Keyboard
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.56 ▼5.26
Dashboard /wp-admin3.38 ▲0.0349.06 ▼19.06
Posts /wp-admin/edit.php3.50 ▲0.1348.93 ▲0.06
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.35 ▼3.78
Media Library /wp-admin/upload.php3.31 ▲0.0734.37 ▼0.07

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Onscreen Keyboard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲16913.88 ▼0.4611.77 ▲9.9742.08 ▼1.63
Dashboard /wp-admin2,208 ▲305.63 ▲0.0589.74 ▼25.0538.06 ▼5.47
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0939.48 ▲2.5737.39 ▲0.68
Add New Post /wp-admin/post-new.php1,544 ▲1822.92 ▼0.16653.85 ▼28.0362.37 ▲1.85
Media Library /wp-admin/upload.php1,413 ▲164.17 ▲0.0197.78 ▼2.3342.61 ▼2.64

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

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

Smoke tests 75% 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)
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/on-screen-keyboard/admin/admin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === on-screen-keyboard === )
You can take inspiration from this readme.txt

on-screen-keyboard/on-screen-keyboard.php 92% from 13 tests

The primary PHP file in "Onscreen Keyboard" version 1.3.10 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 416 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 plugin969 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript55586538
PHP4111240288
CSS21818143

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods628.57%
▷ Public methods1466.67%
▷ Protected methods00.00%
▷ Private methods733.33%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.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
There were not PNG files found in your plugin