10% plugin-sample-shortcode

Code Review | Plugin Sample Shortcode

WordPress plugin Plugin Sample Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: plugin-sample-sho...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Nov 6, 2014
  • Latest release: Nov 16, 2014
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: dipendrapancholi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /883 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_pss_install' not found or invalid function name

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

A check of server-side resources used by Plugin Sample Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.24 ▼3.14
Dashboard /wp-admin3.32 ▲0.0151.79 ▼5.27
Posts /wp-admin/edit.php3.37 ▲0.0148.25 ▼10.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.56 ▼3.55
Media Library /wp-admin/upload.php3.24 ▲0.0140.29 ▼2.11

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Sample Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.46 ▼1.294.91 ▲3.1147.40 ▼2.12
Dashboard /wp-admin2,221 ▲214.88 ▼1.03112.52 ▲10.0446.13 ▼2.12
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0041.37 ▲0.5136.97 ▼1.24
Add New Post /wp-admin/post-new.php1,526 ▼517.54 ▼5.58669.60 ▼17.7257.34 ▼13.53
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.04100.88 ▼14.6753.21 ▼0.10

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid url: ""
The official readme.txt might help

plugin-sample-shortcode/wp-sample-shortcode.php 92% from 13 tests

The main file in "Plugin Sample Shortcode" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("plugin-sample-shortcode.php" instead of "wp-sample-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected49 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3258249

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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
There are no PNG files in this plugin