83% block-permalink-rewriting

Code Review | Block Permalink Rewriting

WordPress plugin Block Permalink Rewriting scored83%from 54 tests.

About plugin

  • Plugin page: block-permalink-r...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Jan 3, 2017
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: tanfwc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /713 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Block Permalink Rewriting
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.98 ▼0.91
Dashboard /wp-admin3.32 ▲0.0147.23 ▼5.60
Posts /wp-admin/edit.php3.37 ▲0.0144.90 ▼5.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.38 ▼8.69
Media Library /wp-admin/upload.php3.24 ▲0.0136.21 ▲1.25

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Block Permalink Rewriting
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.46 ▼0.161.76 ▼0.4547.98 ▲3.76
Dashboard /wp-admin2,206 ▲185.83 ▼0.0394.60 ▼23.4837.31 ▼9.05
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0133.39 ▼6.3633.28 ▲0.51
Add New Post /wp-admin/post-new.php1,534 ▲123.38 ▲0.22659.17 ▼48.9059.92 ▲0.78
Media Library /wp-admin/upload.php1,382 ▼34.31 ▲0.0794.75 ▼11.7739.85 ▼7.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-permalink-rewriting/wp_block_permalink_rewrite.php:17

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === block-permalink-rewriting === )
  • Donate link: Please fix this invalid URI: "Please_donate_to_your_local_charity"
The official readme.txt might help

block-permalink-rewriting/wp_block_permalink_rewrite.php 92% from 13 tests

The main file in "Block Permalink Rewriting" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("block-permalink-rewriting.php" instead of "wp_block_permalink_rewrite.php")

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
There were no executable files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111713

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin