84% command-palette

Code Review | Command Palette

WordPress plugin Command Palette scored84%from 54 tests.

About plugin

  • Plugin page: command-palette
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.9.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Mar 17, 2022
  • Number of updates: 8
  • Update frequency: every 118.4 days
  • Top authors: dinhtungdu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.14ms] Passed 4 tests

An overview of server-side resources used by Command Palette
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0232.83 ▼7.88
Dashboard /wp-admin3.35 ▲0.0543.26 ▼4.31
Posts /wp-admin/edit.php3.47 ▲0.1149.84 ▲5.65
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.10 ▼13.76
Media Library /wp-admin/upload.php3.29 ▲0.0638.19 ▲5.38

Server storage [IO: ▲0.07MB] [DB: ▲0.09MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Command Palette
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.28 ▼0.101.56 ▼0.3535.88 ▼8.34
Dashboard /wp-admin2,235 ▲585.64 ▼0.0284.39 ▼16.4036.32 ▼8.41
Posts /wp-admin/edit.php2,140 ▲402.07 ▲0.0441.14 ▲7.1236.40 ▼1.43
Add New Post /wp-admin/post-new.php1,566 ▲3723.15 ▲0.07673.85 ▼3.9656.87 ▲2.53
Media Library /wp-admin/upload.php1,440 ▲374.28 ▲0.14110.86 ▲14.2347.43 ▲3.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/command-palette/templates/command-palette.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CommandPalette\\Sources\\Base' not found in wp-content/plugins/command-palette/src/Sources/Action.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CommandPalette\\Sources\\Base' not found in wp-content/plugins/command-palette/src/Sources/AdminMenu.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CommandPalette\\Sources\\Base' not found in wp-content/plugins/command-palette/src/Sources/Custom.php:4

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 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: shortcut, quick jump, workflow, admin menu

command-palette/command-palette.php Passed 13 tests

The main PHP file in "Command Palette" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
62 characters long description:
Bring power of text editor command palette to WordPress Admin.

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
Success! There were no dangerous files found in this plugin1,129 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP212314081,075
Markdown126047
JSON1005
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.14
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods87
▷ Static methods1820.69%
▷ Public methods6574.71%
▷ Protected methods55.75%
▷ Private methods1719.54%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin