90% longer-permalinks

Code Review | Longer Permalinks

WordPress plugin Longer Permalinks scored90%from 54 tests.

About plugin

  • Plugin page: longer-permalinks
  • Plugin version: 1.29
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2017
  • Latest release: Sep 28, 2023
  • Number of updates: 49
  • Update frequency: every 48.9 days
  • Top authors: antithesisgr (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

7,000+ active /41,627 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▲2.36ms] Passed 4 tests

This is a short check of server-side resources used by Longer Permalinks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0748.31 ▲4.30
Dashboard /wp-admin3.35 ▲0.0544.27 ▼2.34
Posts /wp-admin/edit.php3.40 ▲0.0550.23 ▲5.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.99 ▲2.27
Media Library /wp-admin/upload.php3.27 ▲0.0537.45 ▲5.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
longer-permalinks-backup-needed
longer-permalinks-wpver
longer-permalinks-revert-needed
longer-permalinks-pluginver
longer-permalinks-dbver
...

Browser metrics Passed 4 tests

Longer Permalinks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.14 ▼0.691.74 ▼0.0942.32 ▼1.28
Dashboard /wp-admin2,203 ▲145.91 ▼0.02108.24 ▼20.0241.88 ▼1.08
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0240.53 ▲3.0637.78 ▲5.97
Add New Post /wp-admin/post-new.php1,549 ▲1418.08 ▼4.98621.75 ▼48.0565.16 ▲5.59
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.0397.88 ▼4.3842.34 ▲0.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • longer-permalinks-revert-needed
    • can_compress_scripts
    • longer-permalinks-backup-needed
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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 require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

longer-permalinks/longer-permalinks.php Passed 13 tests

"Longer Permalinks" version 1.29's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
99 characters long description:
This plugin allows longer permalinks by extending slug length (post_name) from default 200 to 3000.

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
Everything looks great! No dangerous files found in this plugin202 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28048188
Pascal199814

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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