79% my-text-shortcodes

Code Review | My Text Shortcodes

WordPress plugin My Text Shortcodes scored79%from 54 tests.

About plugin

  • Plugin page: my-text-shortcodes
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Jan 18, 2018
  • Number of updates: 10
  • Update frequency: every 82.1 days
  • Top authors: plance (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,035 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by My Text Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0041.48 ▼6.06
Dashboard /wp-admin3.33 ▲0.0246.55 ▼11.81
Posts /wp-admin/edit.php3.38 ▲0.0247.69 ▼4.97
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.77 ▲14.19
Media Library /wp-admin/upload.php3.25 ▲0.0239.94 ▲5.81
List shortcodes /wp-admin/admin.php?page=Plance_MTSC_INIT3.2237.66
Create shortcode /wp-admin/admin.php?page=Plance_MTSC_INIT-form3.2734.83

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

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

Browser metrics Passed 4 tests

My Text Shortcodes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5614.43 ▲0.131.78 ▼0.2244.49 ▼2.64
Dashboard /wp-admin2,233 ▲454.85 ▼1.00112.46 ▼7.6039.09 ▼8.98
Posts /wp-admin/edit.php2,116 ▲242.00 ▼0.0238.75 ▼0.4632.59 ▼4.07
Add New Post /wp-admin/post-new.php1,536 ▲1617.50 ▼5.67722.30 ▲9.7857.70 ▼0.91
Media Library /wp-admin/upload.php1,415 ▲334.10 ▼0.04117.07 ▼3.8451.91 ▼0.81
List shortcodes /wp-admin/admin.php?page=Plance_MTSC_INIT1,0581.7230.4232.41
Create shortcode /wp-admin/admin.php?page=Plance_MTSC_INIT-form8652.0625.9729.15

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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)
Good news, no errors were detected

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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/my-text-shortcodes/my-text-shortcodes.php
    • > /wp-content/plugins/my-text-shortcodes/app/class.table.php
    • > /wp-content/plugins/my-text-shortcodes/app/class.db.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: form_action in wp-content/plugins/my-text-shortcodes/app/view/form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/my-text-shortcodes/app/view/form.php:4
    • > PHP Notice
      Undefined variable: form_title in wp-content/plugins/my-text-shortcodes/app/view/form.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
7 plugin tags: shortcode, page, post, ad, text...

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

The main PHP file in "My Text Shortcodes" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Creating text shortcodes, using friendly interface

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
Good job! No executable or dangerous file extensions detected941 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8157346855
PO File1466986

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity12.43
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods56
▷ Static methods1730.36%
▷ Public methods5089.29%
▷ Protected methods00.00%
▷ Private methods610.71%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected