83% shortcode-get-postpage-link-by-id

Code Review | Get Page Link By ID

WordPress plugin Get Page Link By ID scored83%from 54 tests.

About plugin

  • Plugin page: shortcode-get-pos...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: May 18, 2014
  • Latest release: May 18, 2014
  • Number of updates: 2
  • Update frequency: every 25.0 days
  • Top authors: jitendra5984 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,458 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by Get Page Link By ID
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.90 ▲1.18
Dashboard /wp-admin3.31 ▼0.0448.14 ▼19.03
Posts /wp-admin/edit.php3.36 ▲0.0052.42 ▲2.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.37 ▼16.27
Media Library /wp-admin/upload.php3.23 ▲0.0038.20 ▲2.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Get Page Link By ID
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲1.511.68 ▼0.6643.48 ▲1.20
Dashboard /wp-admin2,195 ▲185.62 ▼0.0394.06 ▼5.4839.01 ▼3.44
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0340.10 ▲1.3735.51 ▼2.15
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▼0.38682.24 ▲11.8053.58 ▲4.35
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.02104.64 ▼3.2547.13 ▲0.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 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/shortcode-get-postpage-link-by-id/getpagebylink.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === shortcode-get-postpage-link-by-id === )
You can look at the official readme.txt

shortcode-get-postpage-link-by-id/getpagebylink.php 92% from 13 tests

This is the main PHP file of "Get Page Link By ID" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shortcode-get-postpage-link-by-id.php" instead of "getpagebylink.php")

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 detected18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16918

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin