10% bsk-easy-permalink

Code Review | BSK Easy Permalink

WordPress plugin BSK Easy Permalink scored10%from 54 tests.

About plugin

  • Plugin page: bsk-easy-permalink
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.2-3.5
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Dec 20, 2012
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: bannersky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /973 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.98MB] [CPU: ▼55.16ms] Passed 4 tests

An overview of server-side resources used by BSK Easy Permalink
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.464.94 ▼38.38
Dashboard /wp-admin2.07 ▼1.285.62 ▼53.51
Posts /wp-admin/edit.php2.07 ▼1.335.37 ▼46.97
Add New Post /wp-admin/post-new.php2.07 ▼3.866.97 ▼81.79
Media Library /wp-admin/upload.php2.07 ▼1.206.55 ▼31.25

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

BSK Easy Permalink: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.021.91 ▲0.1444.86 ▲3.61
Dashboard /wp-admin2,195 ▲155.52 ▼0.1486.38 ▼4.1238.09 ▼0.81
Posts /wp-admin/edit.php2,100 ▲211.97 ▼0.0133.72 ▼6.6034.48 ▼4.85
Add New Post /wp-admin/post-new.php1,526 ▼1222.98 ▼0.42636.89 ▼65.4655.42 ▲4.01
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.21103.28 ▼10.1446.64 ▼1.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/bsk-easy-permalink/BSKEasyPermalink.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (Plugin test smaples.) image missing
The official readme.txt might help

bsk-easy-permalink/BSKEasyPermalink.php 92% from 13 tests

The principal PHP file in "BSK Easy Permalink" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bsk-easy-permalink.php" instead of "BSKEasyPermalink.php")

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
Good job! No executable or dangerous file extensions detected30 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP117830

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.79KB9.96KB▼ 52.07%