84% simple-shortcode-block

Code Review | Simple Shortcode Block

WordPress plugin Simple Shortcode Block scored84%from 54 tests.

About plugin

  • Plugin page: simple-shortcode-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2018
  • Latest release: Nov 16, 2019
  • Number of updates: 8
  • Update frequency: every 50.4 days
  • Top authors: pablocianes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /8,244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.27MB] [CPU: ▼16.43ms] Passed 4 tests

Server-side resources used by Simple Shortcode Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.59 ▲0.58
Dashboard /wp-admin3.32 ▼0.0350.69 ▼14.34
Posts /wp-admin/edit.php3.37 ▲0.0150.22 ▼1.19
Add New Post /wp-admin/post-new.php4.83 ▼1.0651.86 ▼50.77
Media Library /wp-admin/upload.php3.24 ▲0.0139.87 ▲1.44

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
ssb_plugins_data_scripts
can_compress_scripts
db_upgraded
ssb_plugins_data_styles
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Shortcode Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.34 ▼0.021.56 ▼0.4245.77 ▲2.01
Dashboard /wp-admin2,195 ▲185.62 ▲0.0788.83 ▼12.6239.52 ▼2.56
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0434.95 ▼1.6035.01 ▲1.92
Add New Post /wp-admin/post-new.php6,369 ▲4,84327.79 ▲4.67920.99 ▲266.7340.91 ▼13.57
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.0895.26 ▼8.4545.17 ▲1.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ssb_plugins_data_styles
    • widget_recent-posts
    • ssb_plugins_data_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/simple-shortcode-block/core/index.php on line 1
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/simple-shortcode-block/index.php on line 1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: gutenberg, dynamic shortcode, block, shortcode

simple-shortcode-block/simple-shortcode-block.php Passed 13 tests

The main PHP file in "Simple Shortcode Block" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
A simple block to render a shortcode in a dynamic way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected626 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript123056326
PHP7117437270
Sass26029
CSS2101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2177.78%
▷ Protected methods13.70%
▷ Private methods518.52%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin