84% shorthand-connect

Code Review | Shorthand Connect

WordPress plugin Shorthand Connect scored84%from 54 tests.

About plugin

  • Plugin page: shorthand-connect
  • Plugin version: 1.3.29
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 73
  • Update frequency: every 34.0 days
  • Top authors: shorthandconnect (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▲3.30ms] Passed 4 tests

Server-side resources used by Shorthand Connect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1751.02 ▲10.15
Dashboard /wp-admin3.47 ▲0.1652.95 ▼1.30
Posts /wp-admin/edit.php3.59 ▲0.2357.51 ▲4.23
Add New Post /wp-admin/post-new.php6.07 ▲0.18103.54 ▲3.67
Media Library /wp-admin/upload.php3.40 ▲0.1639.60 ▲6.59
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=shorthand_story3.3942.19
Add Shorthand Story /wp-admin/post-new.php?post_type=shorthand_story3.5056.93
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=shorthand_story3.3935.27
Shorthand /wp-admin/options-general.php?page=shorthand-options3.3739.30
Shorthand /wp-admin/edit.php?post_type=shorthand_story3.4540.51

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
sh_permalink
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
category_children
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shorthand Connect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.82 ▲0.441.93 ▲0.3845.03 ▲1.99
Dashboard /wp-admin2,236 ▲595.59 ▼0.0295.47 ▲9.2782.09 ▲38.88
Posts /wp-admin/edit.php2,138 ▲382.02 ▲0.0337.91 ▼4.7034.58 ▼2.10
Add New Post /wp-admin/post-new.php1,558 ▲3223.28 ▲5.57640.75 ▼53.4556.75 ▲6.80
Media Library /wp-admin/upload.php1,441 ▲414.21 ▼0.07102.54 ▼4.2472.65 ▲24.48
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=shorthand_story1,4902.2829.1245.53
Add Shorthand Story /wp-admin/post-new.php?post_type=shorthand_story2,1264.0377.40103.73
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=shorthand_story1,3572.1430.0134.33
Shorthand /wp-admin/options-general.php?page=shorthand-options1,0152.0225.1832.26
Shorthand /wp-admin/edit.php?post_type=shorthand_story1,1702.0133.7928.99

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: 8 options
    • widget_theysaidso_widget
    • db_upgraded
    • category_children
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • sh_permalink
    • theysaidso_admin_options

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
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
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shorthand-connect/shorthand_connect.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/shorthand-connect/templates/single-shorthand_story.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shorthand-connect/includes/shorthand_options.php:303

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

shorthand-connect/shorthand_connect.php 92% from 13 tests

The main PHP script in "Shorthand Connect" version 1.3.29 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shorthand-connect.php" instead of "shorthand_connect.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 detected1,152 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9212801,152

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions44
▷ Named functions4193.18%
▷ Anonymous functions36.82%
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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/icon.png14.93KB0.66KB▼ 95.57%