93% royal-bangla-keyboard

Code Review | Royal Bangla Keyboard

WordPress plugin Royal Bangla Keyboard scored 93% from 54 tests.

About plugin

  • Plugin page: royal-bangla-keyb...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.2
  • WordPress version: 5.9.2
  • First release: May 2, 2015
  • Latest release: Jun 1, 2016
  • Number of updates: 9
  • Update frequency: every 44.2 days
  • Top authors: royaltechbd (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 2,570 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼295.15ms] Passed 4 tests

An overview of server-side resources used by Royal Bangla Keyboard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.4375.38 ▲55.08
Dashboard /wp-admin3.44 ▲0.0441.87 ▲5.64
Posts /wp-admin/edit.php3.67 ▲0.0341.06 ▼0.44
Add New Post /wp-admin/post-new.php6.91 ▼0.06114.49 ▼1,182.34
Media Library /wp-admin/upload.php3.32 ▲0.0228.06 ▼3.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Royal Bangla Keyboard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,357 ▲60217.12 ▲1.5016.22 ▲10.503.25 ▲0.68
Dashboard /wp-admin3,269 ▲4156.81 ▲0.67139.13 ▲6.18170.73 ▲12.71
Posts /wp-admin/edit.php3,076 ▲3853.99 ▲0.7584.97 ▲22.76166.39 ▲24.28
Add New Post /wp-admin/post-new.php1,788 ▲3616.59 ▼4.59437.71 ▼31.02211.22 ▲55.01
Media Library /wp-admin/upload.php1,714 ▲165.81 ▲0.35132.48 ▼19.83226.72 ▲44.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

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)
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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/royal-bangla-keyboard/royal-bangla-keyboard.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/royal-bangla-keyboard/royal-bangla-keyboard.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: A description for screenshot #5 is missing in royal-bangla-keyboard/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

royal-bangla-keyboard/royal-bangla-keyboard.php 92% from 13 tests

The main PHP file in "Royal Bangla Keyboard" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

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
Good job! No executable or dangerous file extensions detected2,938 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript86227482,718
CSS1263185
PHP1161035

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected