89% k-dev-widget-shortcode

Code Review | K-Dev Widget Shortcode

WordPress plugin K-Dev Widget Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: k-dev-widget-shor...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 6, 2021
  • Latest release: Sep 8, 2023
  • Number of updates: 12
  • Update frequency: every 76.4 days
  • Top authors: khaleddeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by K-Dev Widget Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.91 ▲0.33
Dashboard /wp-admin3.31 ▲0.0145.30 ▼4.08
Posts /wp-admin/edit.php3.36 ▲0.0146.94 ▼4.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.39 ▼6.70
Media Library /wp-admin/upload.php3.24 ▲0.0138.75 ▲1.85

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_kdws_shortcode_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for K-Dev Widget Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.141.71 ▲0.0339.83 ▼10.43
Dashboard /wp-admin2,206 ▲185.76 ▲0.8893.56 ▼4.9839.03 ▼3.98
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0140.78 ▲0.2836.45 ▲2.33
Add New Post /wp-admin/post-new.php1,514 ▲12217.69 ▼0.68606.13 ▼28.3151.31 ▼3.54
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.0594.94 ▼6.7640.67 ▼4.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_kdws_shortcode_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
  • Screenshots: Please add images for these screenshots: #1 (/asset/screenshot-1.png), #2 (/asset/screenshot-2.png), #3 (/asset/screenshot-3.png), #4 (/asset/screenshot-4.png)
You can look at the official readme.txt

k-dev-widget-shortcode/index.php 85% from 13 tests

This is the main PHP file of "K-Dev Widget Shortcode" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("k-dev-widget-shortcode.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin149 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File2181888
PHP2142861

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png8.37KB3.85KB▼ 54.00%
screenshot-2.png64.20KB24.94KB▼ 61.16%
screenshot-4.png9.69KB3.33KB▼ 65.59%
screenshot-1.png8.84KB4.31KB▼ 51.22%