73% urdu-keyboard

Code Review | Urdu Keyboard

WordPress plugin Urdu Keyboard scored73%from 54 tests.

About plugin

  • Plugin page: urdu-keyboard
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Mar 6, 2023
  • Number of updates: 34
  • Update frequency: every 87.7 days
  • Top authors: zayedbaloch (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /26,370 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.21MB] [CPU: ▼35.04ms] Passed 4 tests

Server-side resources used by Urdu Keyboard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7115.75 ▼19.64
Dashboard /wp-admin2.80 ▼0.5018.33 ▼26.93
Posts /wp-admin/edit.php2.80 ▼0.5516.29 ▼23.91
Add New Post /wp-admin/post-new.php2.80 ▼3.0816.48 ▼69.67
Media Library /wp-admin/upload.php2.80 ▼0.4320.92 ▼11.22

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Urdu Keyboard
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲6113.23 ▼1.331.71 ▼0.1243.94 ▲4.83
Dashboard /wp-admin2,223 ▲315.08 ▼0.82101.03 ▼18.6088.77 ▲43.24
Posts /wp-admin/edit.php2,117 ▲282.06 ▲0.0436.68 ▲3.6437.02 ▲3.82
Add New Post /wp-admin/post-new.php1,697 ▲16122.62 ▼0.64694.30 ▲32.3334.36 ▼23.30
Media Library /wp-admin/upload.php1,410 ▲224.29 ▲0.07105.47 ▲6.3584.69 ▲40.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/urdu-keyboard/urduwriting.php+35
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/urdu-keyboard/urduwriting.php

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Urdu Writing in WordPress posts / pages), #2 (Keyboard layout), #3 (Tags)
You can take inspiration from this readme.txt

urdu-keyboard/urduwriting.php 85% from 13 tests

The entry point to "Urdu Keyboard" version 1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("urdu-keyboard.php" instead of "urduwriting.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected652 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28468555
PHP1253376
CSS14421

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/admin-icon_vectorized.png17.73KB9.75KB▼ 45.01%
assets/images/admin-icon.png1.18KB0.28KB▼ 76.34%
assets/images/ic-keyboard.png1.52KB0.81KB▼ 46.75%
assets/images/ic-browsers.png9.63KB3.91KB▼ 59.44%