84% simple-text-shortcodes

Code Review | Simple Text Shortcodes

WordPress plugin Simple Text Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: simple-text-short...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.9.5
  • WordPress version: 6.3.1
  • First release: Aug 4, 2016
  • Latest release: Apr 18, 2018
  • Number of updates: 8
  • Update frequency: every 78.5 days
  • Top authors: alpanayotov (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /1,936 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.14ms] Passed 4 tests

Server-side resources used by Simple Text Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.27 ▲4.95
Dashboard /wp-admin3.34 ▼0.0149.96 ▼9.81
Posts /wp-admin/edit.php3.39 ▲0.0346.13 ▼3.47
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.10 ▼12.21
Media Library /wp-admin/upload.php3.27 ▲0.0335.98 ▲0.92
Add New /wp-admin/post-new.php?post_type=alp_shortcode3.3647.56
Shortcodes /wp-admin/edit.php?post_type=alp_shortcode3.3138.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Text Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.25 ▼0.961.92 ▲0.1240.71 ▲2.90
Dashboard /wp-admin2,233 ▲484.81 ▼1.07103.89 ▲2.7241.52 ▼5.49
Posts /wp-admin/edit.php2,116 ▲242.04 ▼0.0035.59 ▼4.9233.31 ▼4.79
Add New Post /wp-admin/post-new.php1,556 ▲2323.17 ▲0.15650.19 ▼18.9455.95 ▼2.81
Media Library /wp-admin/upload.php1,415 ▲304.26 ▲0.07100.55 ▲0.7943.09 ▼2.28
Add New /wp-admin/post-new.php?post_type=alp_shortcode2,1567.60176.8167.64
Shortcodes /wp-admin/edit.php?post_type=alp_shortcode1,0881.9430.7032.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-text-shortcodes/simple-text-shortcodes.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-text-shortcodes === )
The official readme.txt is a good inspiration

simple-text-shortcodes/simple-text-shortcodes.php Passed 13 tests

The primary PHP file in "Simple Text Shortcodes" version 0.4 is used by WordPress to initiate all plugin functionality
55 characters long description:
Simple plugin for creating and managing text shortcodes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin74 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1221066
Markdown1708

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods240.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 images were found in this plugin