90% custom-permalinks

Code Review | Custom Permalinks

WordPress plugin Custom Permalinks scored90%from 54 tests.

About plugin

  • Plugin page: custom-permalinks
  • Plugin version: 2.5.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2008
  • Latest release: Feb 14, 2023
  • Number of updates: 192
  • Update frequency: every 27.2 days
  • Top authors: sasiddiqui (68.75%)michaeltyson (31.77%)

Code review

54 tests

User reviews

111 reviews

Install metrics

100,000+ active /2,076,523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.41MB] [CPU: ▼5.39ms] Passed 4 tests

An overview of server-side resources used by Custom Permalinks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4345.50 ▲4.97
Dashboard /wp-admin3.76 ▲0.4151.76 ▼12.69
Posts /wp-admin/edit.php3.81 ▲0.4548.51 ▲1.20
Add New Post /wp-admin/post-new.php6.30 ▲0.4182.32 ▼12.29
Media Library /wp-admin/upload.php3.62 ▲0.3937.95 ▲2.24
Taxonomies Permalinks /wp-admin/admin.php?page=cp-taxonomy-permalinks3.6030.59
About /wp-admin/admin.php?page=cp-about-plugins3.6432.33
Post Types Permalinks /wp-admin/admin.php?page=cp-post-permalinks3.6050.12

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
custom_permalinks_plugin_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom Permalinks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.41 ▲0.211.75 ▲0.0245.50 ▼2.15
Dashboard /wp-admin2,223 ▲465.61 ▼0.05104.73 ▲2.4743.14 ▲0.19
Posts /wp-admin/edit.php2,131 ▲311.95 ▼0.0734.60 ▼1.8333.48 ▼3.00
Add New Post /wp-admin/post-new.php6,275 ▲4,74726.22 ▲2.85916.93 ▲250.4949.55 ▼0.80
Media Library /wp-admin/upload.php1,434 ▲314.19 ▲0.01100.06 ▼12.8243.78 ▼5.51
Taxonomies Permalinks /wp-admin/admin.php?page=cp-taxonomy-permalinks9631.6525.6823.41
About /wp-admin/admin.php?page=cp-about-plugins2,1941.9922.4946.82
Post Types Permalinks /wp-admin/admin.php?page=cp-post-permalinks1,0602.0437.6442.98

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • custom_permalinks_plugin_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • 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 no errors were found, this is by no means 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: gdpr compliant, gdpr, link, address, custom...

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

"Custom Permalinks" version 2.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
Set custom permalinks on a per-post basis.

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
Success! There were no dangerous files found in this plugin11,064 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
SVG9118,119
PHP124711,1752,619
PO File6132212324
CSS1001
JavaScript1001

PHP code Passed 2 tests

This is a very shot 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.41
Average class complexity39.89
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes444.44%
Methods93
▷ Static methods1111.83%
▷ Public methods6670.97%
▷ Protected methods1212.90%
▷ Private methods1516.13%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/media-post-permalink.png24.03KB11.56KB▼ 51.92%
assets/images/prevent-xss-vulnerability.png7.36KB7.25KB▼ 1.51%