94% get-post-content-shortcode

Code Review | Get Post Content Shortcode

WordPress plugin Get Post Content Shortcode scored 94% from 54 tests.

About plugin

  • Plugin page: get-post-content-...
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.5.0
  • WordPress version: 5.8.1
  • First release: May 20, 2014
  • Latest release: Apr 20, 2016
  • Number of updates: 9
  • Update frequency: every 77.9 days
  • Top authors: webdeveric (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active / 2,915 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Get Post Content Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1338.56 ▲12.60
Dashboard /wp-admin3.07 ▲0.0248.70 ▲2.56
Posts /wp-admin/edit.php3.12 ▲0.0250.32 ▼2.70
Add New Post /wp-admin/post-new.php5.43 ▼0.00104.37 ▼674.66
Media Library /wp-admin/upload.php3.01 ▲0.0137.03 ▼2.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Get Post Content Shortcode: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.26 ▲0.669.46 ▼3.0853.28 ▲4.02
Dashboard /wp-admin2,970 ▲365.93 ▼0.01158.28 ▼8.64123.19 ▲4.99
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0166.14 ▼9.2598.36 ▲0.61
Add New Post /wp-admin/post-new.php1,615 ▼6821.50 ▲5.78324.09 ▼132.47116.16 ▲0.55
Media Library /wp-admin/upload.php1,748 ▼595.00 ▼0.00161.14 ▼5.21125.91 ▲8.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% 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)
Even though everything seems fine, this is not 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/get-post-content-shortcode/get-post-content-shortcode.php:138

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
2 plugin tags: post content, shortcode

get-post-content-shortcode/get-post-content-shortcode.php Passed 13 tests

"Get Post Content Shortcode" version 0.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
81 characters long description:
This plugin provides a shortcode to get the content of a post based on ID number.

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
No dangerous file extensions were detected140 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1219108
JSON10032

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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