10% shortcode-content

Code Review | Shortcode Content

WordPress plugin Shortcode Content scored10%from 54 tests.

About plugin

  • Plugin page: shortcode-content
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2019
  • Latest release: Mar 21, 2019
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: elodevs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /512 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/shortcode-content/sc_content.php+44
    Undefined index: page

Server metrics [RAM: ▼1.89MB] [CPU: ▼68.91ms] Passed 4 tests

An overview of server-side resources used by Shortcode Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.81 ▼42.37
Dashboard /wp-admin2.11 ▼1.195.38 ▼70.79
Posts /wp-admin/edit.php2.11 ▼1.247.54 ▼51.03
Add New Post /wp-admin/post-new.php2.11 ▼3.775.71 ▼111.45
Media Library /wp-admin/upload.php2.11 ▼1.114.61 ▼36.38
Add new /wp-admin/admin.php?page=add_new3.2636.26
SC Content /wp-admin/admin.php?page=sc_content3.3042.99

Server storage [IO: ▲1.14MB] [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: 16 new files
Database: 2 new tables, 7 new options
New tables
wp_sc_content
wp_sc_content_meta
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
sc_version
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Shortcode Content: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.35 ▼0.241.49 ▼0.8847.06 ▼8.17
Dashboard /wp-admin2,221 ▲445.62 ▼0.0691.94 ▼19.6142.49 ▼9.22
Posts /wp-admin/edit.php2,120 ▲171.96 ▼0.0639.86 ▼11.0836.32 ▼8.91
Add New Post /wp-admin/post-new.php1,545 ▲1922.95 ▼0.26629.67 ▼120.8548.73 ▼23.20
Media Library /wp-admin/upload.php1,426 ▲294.28 ▲0.08110.39 ▼15.4945.52 ▼8.15
Add new /wp-admin/admin.php?page=add_new8592.0127.5195.25
SC Content /wp-admin/admin.php?page=sc_content9932.1624.6071.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/shortcode-content/sc_content.php+44
    Undefined index: page
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • sc_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 96% from 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
5 plugin tags: user roles create, shortcode with content, shortcode, user roles, shortcodes

shortcode-content/sc_content.php 92% from 13 tests

This is the main PHP file of "Shortcode Content" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shortcode-content.php" instead of "sc_content.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
Success! There were no dangerous files found in this plugin30,594 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS43,0215123,927
JavaScript41,5791,8716,003
PHP611296664

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin