84% custom-shortcode-creator

Code Review | Custom ShortCode Creator

WordPress plugin Custom ShortCode Creator scored84%from 54 tests.

About plugin

  • Plugin page: custom-shortcode-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Dec 12, 2015
  • Latest release: Dec 12, 2015
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: swadeshswain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.63ms] Passed 4 tests

A check of server-side resources used by Custom ShortCode Creator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.16 ▲0.39
Dashboard /wp-admin3.34 ▼0.0147.41 ▼15.24
Posts /wp-admin/edit.php3.39 ▲0.0346.44 ▼3.10
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.52 ▼20.58
Media Library /wp-admin/upload.php3.26 ▲0.0343.30 ▲10.51
Short Codes /wp-admin/edit.php?post_type=odras_myshortcodes3.3037.34
Add New /wp-admin/post-new.php?post_type=odras_myshortcodes3.3845.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom ShortCode Creator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.44 ▲0.141.84 ▲0.1244.12 ▲1.71
Dashboard /wp-admin2,235 ▲475.79 ▼0.0395.61 ▼20.9976.80 ▲34.53
Posts /wp-admin/edit.php2,112 ▲232.01 ▲0.0032.27 ▼4.2232.06 ▼3.01
Add New Post /wp-admin/post-new.php1,690 ▲17122.48 ▼0.47741.58 ▲123.1053.91 ▲5.11
Media Library /wp-admin/upload.php1,414 ▲294.22 ▲0.0595.71 ▼7.1169.54 ▲23.41
Short Codes /wp-admin/edit.php?post_type=odras_myshortcodes1,1041.9634.3228.41
Add New /wp-admin/post-new.php?post_type=odras_myshortcodes2,1537.74175.10128.21

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-shortcode-creator/shortcode.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #3 (screenshot-3)
You can look at the official readme.txt

custom-shortcode-creator/shortcode.php 92% from 13 tests

The entry point to "Custom ShortCode Creator" version 2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-shortcode-creator.php" instead of "shortcode.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
Success! There were no dangerous files found in this plugin69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP10969

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.21MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png46.41KB23.37KB▼ 49.65%
images/screenshot 2.png46.41KB23.37KB▼ 49.65%
images/screen 1.png61.12KB36.30KB▼ 40.61%
images/image.png0.95KB1.05KB0.00%
screenshot-1.png61.12KB36.30KB▼ 40.61%