78% simple-shortcode-buttons

Code Review | Simple shortcode buttons

WordPress plugin Simple shortcode buttons scored78%from 54 tests.

About plugin

  • Plugin page: simple-shortcode-...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2015
  • Latest release: Oct 27, 2016
  • Number of updates: 19
  • Update frequency: every 20.6 days
  • Top authors: davidpuc (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /2,230 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.05MB] [CPU: ▼0.90ms] Passed 4 tests

A check of server-side resources used by Simple shortcode buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.32 ▼7.38
Dashboard /wp-admin3.38 ▲0.0751.16 ▼1.29
Posts /wp-admin/edit.php3.50 ▲0.1452.97 ▲8.44
Add New Post /wp-admin/post-new.php5.96 ▲0.07100.37 ▲0.27
Media Library /wp-admin/upload.php3.28 ▲0.0541.29 ▲4.81

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
dps_shortcodes
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple shortcode buttons: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲23814.72 ▲0.351.85 ▲0.1038.61 ▼4.43
Dashboard /wp-admin2,365 ▲1746.45 ▲1.58132.96 ▲17.2840.00 ▼4.27
Posts /wp-admin/edit.php2,268 ▲1793.46 ▲1.4248.35 ▲7.4334.04 ▼0.04
Add New Post /wp-admin/post-new.php1,534 ▲2023.29 ▲5.74573.57 ▼100.8033.88 ▼15.76
Media Library /wp-admin/upload.php1,407 ▲164.13 ▼0.0380.24 ▼23.3342.27 ▼0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • dps_shortcodes
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Everything seems fine, however 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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-shortcode-buttons/dp_shortcode_buttons_script.php
    • > /wp-content/plugins/simple-shortcode-buttons/dp_shortcodes_edit.php
    • > /wp-content/plugins/simple-shortcode-buttons/core.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/simple-shortcode-buttons/functions.php:14

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: edit, shortcode, editor, buttons

simple-shortcode-buttons/functions.php 92% from 13 tests

The entry point to "Simple shortcode buttons" version 1.3.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-shortcode-buttons.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin769 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP41429621
JavaScript22830112
CSS16036

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.29
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.88KB0.50KB▼ 43.46%