84% posts-short-link

Code Review | Posts short link

WordPress plugin Posts short link scored84%from 54 tests.

About plugin

  • Plugin page: posts-short-link
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 1, 2022
  • Latest release: Mar 1, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jalali2536 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Posts short link
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.29 ▼7.80
Dashboard /wp-admin3.31 ▲0.0144.12 ▼7.64
Posts /wp-admin/edit.php3.37 ▲0.0147.05 ▲1.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.68 ▲0.29
Media Library /wp-admin/upload.php3.24 ▲0.0136.79 ▲3.96
Posts short link /wp-admin/options-general.php?page=psl-panel3.2026.44

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Posts short link
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼1.071.71 ▼0.0636.41 ▼12.47
Dashboard /wp-admin2,210 ▲195.83 ▲1.00114.49 ▲13.2243.46 ▲2.21
Posts /wp-admin/edit.php2,104 ▲152.12 ▲0.1040.43 ▲4.7434.17 ▲1.06
Add New Post /wp-admin/post-new.php1,536 ▲2223.27 ▲5.70669.14 ▲51.7249.71 ▼0.33
Media Library /wp-admin/upload.php1,386 ▲14.24 ▲0.0696.99 ▼3.9842.09 ▼3.30
Posts short link /wp-admin/options-general.php?page=psl-panel8382.0626.9728.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/posts-short-link/posts-shortlink.php:193

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
The official readme.txt might help

posts-short-link/posts-shortlink.php 92% from 13 tests

The entry point to "Posts short link" version 1.2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("posts-short-link.php" instead of "posts-shortlink.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected270 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP140129270

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG files were detected