84% simple-stupid-shortcode

Code Review | Simple Stupid Shortcode

WordPress plugin Simple Stupid Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: simple-stupid-sho...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2017
  • Latest release: Nov 29, 2017
  • Number of updates: 7
  • Update frequency: every 26.0 days
  • Top authors: lorenzck (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,082 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Simple Stupid Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.21 ▼0.16
Dashboard /wp-admin3.31 ▼0.0448.52 ▼16.25
Posts /wp-admin/edit.php3.36 ▲0.0050.06 ▼0.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.76 ▼12.82
Media Library /wp-admin/upload.php3.23 ▲0.0135.40 ▼0.14

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Simple Stupid Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▼0.111.76 ▼0.4942.91 ▼0.41
Dashboard /wp-admin2,206 ▲275.84 ▼0.06100.11 ▼14.0139.40 ▼4.44
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0738.92 ▲1.2737.13 ▲0.14
Add New Post /wp-admin/post-new.php1,533 ▲323.17 ▲4.64646.09 ▼19.0257.17 ▼7.21
Media Library /wp-admin/upload.php1,396 ▲54.45 ▲0.1999.81 ▼4.1043.60 ▼0.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-stupid-shortcode/simplestupidshortcode.php:122

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: picture, embed, image, shortcode, media

simple-stupid-shortcode/simplestupidshortcode.php 92% from 13 tests

The primary PHP file in "Simple Stupid Shortcode" version 1.5.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-stupid-shortcode.php" instead of "simplestupidshortcode.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
Good job! No executable or dangerous file extensions detected171 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13940146
JavaScript16025

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected