66% shortcode-maker

Code Review | Shortcode Maker

WordPress plugin Shortcode Maker scored66%from 54 tests.

About plugin

  • Plugin page: shortcode-maker
  • Plugin version: 5.0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 9, 2015
  • Latest release: Dec 5, 2019
  • Number of updates: 98
  • Update frequency: every 18.6 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

300+ active /20,209 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼0.13ms] 75% from 4 tests

This is a short check of server-side resources used by Shortcode Maker
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 932.06ms on /wp-admin/edit.php?post_type=sm_shortcode&page=shortcode-maker/more-products.php)
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4240.41 ▲2.01
Dashboard /wp-admin3.72 ▲0.4246.69 ▼3.02
Posts /wp-admin/edit.php3.71 ▲0.361,113.01 ▲1,068.37
Add New Post /wp-admin/post-new.php6.28 ▲0.4088.74 ▼2.39
Media Library /wp-admin/upload.php3.58 ▲0.3537.21 ▲2.88
Shortcode Packages /wp-admin/edit.php?post_type=sm_shortcode&page=smps_shortcode_packages3.61939.72
All Shortcode /wp-admin/edit.php?post_type=sm_shortcode3.69917.87
News /wp-admin/edit.php?post_type=sm_shortcode&page=shortcode-maker/news.php3.60940.55
Add New Shortcode /wp-admin/post-new.php?post_type=sm_shortcode3.8454.38
Cybercraft Products /wp-admin/edit.php?post_type=sm_shortcode&page=shortcode-maker/more-products.php3.60932.06

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
sm_shortcode_package_list

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode Maker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10814.78 ▲0.201.67 ▼0.1842.51 ▼0.75
Dashboard /wp-admin2,257 ▲694.85 ▼0.22115.94 ▼1.4441.90 ▼1.05
Posts /wp-admin/edit.php2,143 ▲542.01 ▲0.0134.98 ▼1.0931.28 ▼3.89
Add New Post /wp-admin/post-new.php3,832 ▲2,29523.99 ▲0.73756.20 ▲52.7338.96 ▼17.15
Media Library /wp-admin/upload.php1,433 ▲484.18 ▼0.02101.28 ▼21.0843.51 ▼11.20
Shortcode Packages /wp-admin/edit.php?post_type=sm_shortcode&page=smps_shortcode_packages9692.3038.1926.32
All Shortcode /wp-admin/edit.php?post_type=sm_shortcode1,1011.9532.1828.00
News /wp-admin/edit.php?post_type=sm_shortcode&page=shortcode-maker/news.php7922.0323.3222.34
Add New Shortcode /wp-admin/post-new.php?post_type=sm_shortcode5,0978.85212.53141.33
Cybercraft Products /wp-admin/edit.php?post_type=sm_shortcode&page=shortcode-maker/more-products.php7982.0624.3023.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • sm_shortcode_package_list
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sm_shortcode&page=shortcode-maker/more-products.php
    • > Notice in wp-content/plugins/shortcode-maker/news.php+69
    Trying to access array offset on value of type null

SRP 0% 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 items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/shortcode-maker/documentation/template.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-maker/more-products.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-maker/packaged-shortcodes/packaged-shortcodes-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shortcode-maker/pro-demo.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-maker/vote.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/shortcode-maker/packaged-shortcodes/packages/simple-light/settings-templates.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/shortcode-maker/documentation/documentation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/shortcode-maker/packaged-shortcodes/packages/simple-light/settings-template.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-maker/cc-products-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-maker/packaged-shortcodes/packages/simple-light/simple-light.php:120
    • > PHP Fatal error
      Uncaught Error: Class 'Smps_Simple_Light' not found in wp-content/plugins/shortcode-maker/packaged-shortcodes/packages/simple-light/definitions.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=sm_shortcode&page=smps_shortcode_packages
    • > Javascript (severe) in unknown
    /wp-content/plugins/shortcode-maker/assets/js/smps-admin-script.js?ver=6.3.1 1:17 Uncaught ReferenceError: VueColor is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (26 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (screenshot-5) image missing
You can look at the official readme.txt

shortcode-maker/shortcode-maker.php 92% from 13 tests

The main PHP file in "Shortcode Maker" ver. 5.0.4.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected55,261 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS8849219,083
JavaScript152,4064,82517,296
LESS4413411,609
PHP205073714,153
SVG2002,959
Markdown1880131
JSON10030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.29
▷ Minimum class complexity3.00
▷ Maximum class complexity81.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods114
▷ Static methods6859.65%
▷ Public methods114100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1368.42%
▷ Anonymous functions631.58%
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
5 PNG files occupy 0.35MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
documentation/assets/images/1.png83.63KB25.48KB▼ 69.53%
documentation/assets/images/4.png82.49KB27.51KB▼ 66.65%
documentation/assets/images/3.png87.51KB29.89KB▼ 65.84%
documentation/assets/images/5.png44.66KB11.52KB▼ 74.21%
documentation/assets/images/2.png56.18KB15.27KB▼ 72.81%