68% create-own-shortcode

Code Review | Create Own ShortCode

WordPress plugin Create Own ShortCode scored68%from 54 tests.

About plugin

  • Plugin page: create-own-shortcode
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Dec 31, 2015
  • Number of updates: 21
  • Update frequency: every 2.7 days
  • Top authors: mynamevenu24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /947 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Create Own ShortCode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /65.35 ▲0.0112,854,086.79 ▲8,948.37
Dashboard /wp-admin3.39 ▲0.0055.49 ▼7.69
Posts /wp-admin/edit.php3.51 ▲0.1158.00 ▼3.14
Add New Post /wp-admin/post-new.php5.95 ▲0.0291.38 ▼9.23
Media Library /wp-admin/upload.php3.30 ▲0.0244.24 ▲5.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 2 new tables, 6 new options
New tables
wp_create_image_shortcode
wp_create_own_shortcode
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Create Own ShortCode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18314.07 ▼0.282.06 ▲0.0345.43 ▼1.73
Dashboard /wp-admin2,344 ▲1706.16 ▲0.56113.48 ▲19.4644.61 ▲3.97
Posts /wp-admin/edit.php2,278 ▲1753.27 ▲1.2454.68 ▲12.7136.31 ▼5.13
Add New Post /wp-admin/post-new.php1,695 ▲16922.06 ▼0.98629.51 ▼107.2732.78 ▼22.89
Media Library /wp-admin/upload.php1,421 ▲244.13 ▲0.0281.32 ▼35.3945.44 ▼1.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_create_own_shortcode
    • wp_create_image_shortcode
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/create-own-shortcode/shortcode_components.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/create-own-shortcode/create_own_shotcode.php:16

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Create content ShortCode), #2 (Copy shortcode and paste it in pages or posts or widgets), #3 (Create image shortcode)
You can look at the official readme.txt

create-own-shortcode/create_own_shotcode.php 92% from 13 tests

This is the main PHP file of "Create Own 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
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("create-own-shortcode.php" instead of "create_own_shotcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected521 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP213244407
CSS1181114

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png15.01KB7.90KB▼ 47.37%
screenshot-3.png23.59KB10.72KB▼ 54.57%
plugin_own.png80.79KB30.26KB▼ 62.54%
css/default.png4.81KB2.02KB▼ 57.90%
screenshot-1.png61.22KB27.04KB▼ 55.83%