93% share-post-shortcode

Code Review | Share Post Shortcode

WordPress plugin Share Post Shortcode scored 93% from 54 tests.

About plugin

  • Plugin page: share-post-shortcode
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 5.8.1
  • First release: Sep 14, 2013
  • Latest release: Sep 18, 2013
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: hondamarlboro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 730 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼140.37ms] Passed 4 tests

An overview of server-side resources used by Share Post Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1246.31 ▲23.55
Dashboard /wp-admin3.06 ▲0.0040.38 ▲0.72
Posts /wp-admin/edit.php3.11 ▲0.0039.06 ▼1.86
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.69 ▼551.14
Media Library /wp-admin/upload.php3.00 ▼0.0129.08 ▼9.18

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Share Post Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10815.76 ▲0.247.20 ▼0.9743.18 ▼4.75
Dashboard /wp-admin2,967 ▲365.87 ▼0.26141.46 ▼2.49110.80 ▲0.74
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.1263.18 ▲1.2983.32 ▼2.23
Add New Post /wp-admin/post-new.php1,615 ▲11521.67 ▲3.02269.68 ▼85.70101.54 ▼2.46
Media Library /wp-admin/upload.php1,810 ▲34.99 ▲0.01154.47 ▲14.70110.85 ▼11.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please 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/share-post-shortcode/sharepost.php:53

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

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === share-post-shortcode === )
You can take inspiration from this readme.txt

share-post-shortcode/sharepost.php 92% from 13 tests

"Share Post Shortcode" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("share-post-shortcode.php" instead of "sharepost.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected37 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18937

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected