84% wp-better-permalinks

Code Review | WP Better Permalinks

WordPress plugin WP Better Permalinks scored84%from 54 tests.

About plugin

  • Plugin page: wp-better-permalinks
  • Plugin version: 4.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2017
  • Latest release: Sep 27, 2023
  • Number of updates: 83
  • Update frequency: every 26.3 days
  • Top authors: mateuszgbiorczyk (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

1,000+ active /21,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by WP Better Permalinks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.91 ▼2.86
Dashboard /wp-admin3.35 ▲0.0549.25 ▲2.43
Posts /wp-admin/edit.php3.40 ▲0.0547.51 ▼2.19
Add New Post /wp-admin/post-new.php5.95 ▲0.0797.66 ▲1.21
Media Library /wp-admin/upload.php3.27 ▲0.0536.79 ▲3.28
WP Better Permalinks /wp-admin/options-general.php?page=wbp_admin_page3.2830.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Better Permalinks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5113.32 ▼1.271.71 ▼0.3444.47 ▼5.54
Dashboard /wp-admin2,217 ▲294.82 ▼1.0399.95 ▼16.3942.99 ▼4.13
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0135.80 ▼1.8133.47 ▼0.48
Add New Post /wp-admin/post-new.php1,524 ▼1823.31 ▲4.95573.20 ▼26.2147.71 ▲1.12
Media Library /wp-admin/upload.php1,396 ▲54.20 ▲0.0796.75 ▼2.2142.36 ▲0.64
WP Better Permalinks /wp-admin/options-general.php?page=wbp_admin_page9322.0222.9068.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-better-permalinks/resources/components/settings/post-types.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-better-permalinks/resources/components/widgets/support.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menu_page_url() in wp-content/plugins/wp-better-permalinks/resources/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-better-permalinks/resources/components/widgets/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-better-permalinks/resources/components/notices/thanks.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-better-permalinks/resources/components/widgets/donate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-better-permalinks/wp-better-permalinks.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-better-permalinks/resources/components/widgets/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: taxonomy term permalinks, custom post type permalinks, friendly permalinks, permalinks tree, permalinks structure

wp-better-permalinks/wp-better-permalinks.php 92% from 13 tests

The main PHP file in "WP Better Permalinks" ver. 4.1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,592 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP484122481,585
JSON1005
CSS1001
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.40
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods123
▷ Static methods1613.01%
▷ Public methods10383.74%
▷ Protected methods00.00%
▷ Private methods2016.26%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin