84% user-shortcodes-plus

Code Review | User Shortcodes Plus

WordPress plugin User Shortcodes Plus scored84%from 54 tests.

About plugin

  • Plugin page: user-shortcodes-plus
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 12, 2016
  • Latest release: Aug 31, 2019
  • Number of updates: 17
  • Update frequency: every 72.7 days
  • Top authors: kbjohnson90 (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

7,000+ active /52,317 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by User Shortcodes Plus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.64 ▼2.36
Dashboard /wp-admin3.32 ▲0.0248.93 ▼3.14
Posts /wp-admin/edit.php3.38 ▲0.0250.28 ▼4.32
Add New Post /wp-admin/post-new.php5.87 ▼0.0187.90 ▼8.80
Media Library /wp-admin/upload.php3.25 ▲0.0238.85 ▲3.10

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for User Shortcodes Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.19 ▼0.981.82 ▼0.0743.55 ▼1.83
Dashboard /wp-admin2,210 ▲224.88 ▲0.0197.87 ▼15.3138.75 ▼2.43
Posts /wp-admin/edit.php2,096 ▲42.03 ▲0.0341.25 ▼0.1834.90 ▼1.34
Add New Post /wp-admin/post-new.php1,539 ▲1118.67 ▲0.51629.42 ▼47.2035.08 ▼22.36
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0195.23 ▼10.9641.57 ▼1.60

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: users in wp-content/plugins/user-shortcodes-plus/includes/Templates/admin-tinymce-modal.html.php on line 13
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/user-shortcodes-plus/includes/Templates/admin-tinymce-modal.html.php on line 13
    • > PHP Notice
      Undefined variable: shortcodes in wp-content/plugins/user-shortcodes-plus/includes/Templates/admin-tinymce-modal.html.php on line 22
    • > PHP Notice
      Undefined variable: button_text in wp-content/plugins/user-shortcodes-plus/includes/Templates/admin-tinymce-modal.html.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-shortcodes-plus/user-shortcodes-plus.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/user-shortcodes-plus/includes/Config/Shortcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/user-shortcodes-plus/includes/Templates/admin-tinymce-modal.html.php:26
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/user-shortcodes-plus/includes/Templates/admin-tinymce-modal.html.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: meta, user, shortcodes

user-shortcodes-plus/user-shortcodes-plus.php 92% from 13 tests

"User Shortcodes Plus" version 2.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

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
Everything looks great! No dangerous files found in this plugin365 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP87413300
JavaScript212047
CSS12018

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes5100.00%
Methods23
▷ Static methods626.09%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There were not PNG files found in your plugin