79% smpl-shortcodes

Code Review | Simple Shortcodes

WordPress plugin Simple Shortcodes scored79%from 54 tests.

About plugin

  • Plugin page: smpl-shortcodes
  • Plugin version: 1.0.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Jun 22, 2016
  • Number of updates: 90
  • Update frequency: every 9.4 days
  • Top authors: simplethemes (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /64,736 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.09ms] Passed 4 tests

Server-side resources used by Simple Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1245.39 ▼2.61
Dashboard /wp-admin3.37 ▲0.0751.67 ▼1.32
Posts /wp-admin/edit.php3.48 ▲0.1351.22 ▲2.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0794.15 ▼2.72
Media Library /wp-admin/upload.php3.29 ▲0.0741.03 ▲5.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.58 ▼0.979.97 ▲8.3647.32 ▼1.11
Dashboard /wp-admin2,223 ▲174.87 ▲0.01107.60 ▼11.3641.58 ▼5.72
Posts /wp-admin/edit.php2,099 ▲22.06 ▲0.0439.13 ▲0.5134.85 ▼4.66
Add New Post /wp-admin/post-new.php1,528 ▼1817.38 ▼5.73624.80 ▼43.8853.61 ▼0.10
Media Library /wp-admin/upload.php1,402 ▲24.17 ▼0.07105.41 ▼17.6442.88 ▼5.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smpl-shortcodes/includes/admin/generator/assets/js/dialog-js.php
    • > /wp-content/plugins/smpl-shortcodes/includes/admin/generator/dialog.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/smpl-shortcodes/smpl-shortcodes.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: skeleton, youtube, editor, buttons, callout...

smpl-shortcodes/smpl-shortcodes.php Passed 13 tests

The main file in "Simple Shortcodes" v. 1.0.20 serves as a complement to information provided in readme.txt and as the entry point to the plugin
123 characters long description:
This plugin works in conjuction with the SMPL framework to create shortcodes for many of the framework's internal elements.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,396 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript131472301,216
PHP63404121,063
Sass1207381,028
PO File1101045
CSS20038
Ruby1036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.50
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
13 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/file_download.png0.28KB0.32KB0.00%
includes/admin/generator/assets/images/title-bg.png0.99KB0.09KB▼ 90.86%
assets/images/fadeline-light.png1.39KB2.85KB0.00%
assets/images/accept.png0.31KB0.39KB0.00%
includes/admin/generator/assets/images/smpl-icon.png41.26KB0.31KB▼ 99.25%