90% lh-better-slugs

Code Review | LH Better Slugs

WordPress plugin LH Better Slugs scored90%from 54 tests.

About plugin

  • Plugin page: lh-better-slugs
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: May 28, 2018
  • Latest release: Jul 30, 2022
  • Number of updates: 4
  • Update frequency: every 381.5 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.57ms] Passed 4 tests

Server-side resources used by LH Better Slugs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.76 ▼5.23
Dashboard /wp-admin3.31 ▲0.0146.08 ▼9.26
Posts /wp-admin/edit.php3.36 ▲0.0045.26 ▼4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.79 ▲0.31
Media Library /wp-admin/upload.php3.23 ▲0.0039.38 ▲3.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for LH Better Slugs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.121.76 ▼0.2740.46 ▼5.41
Dashboard /wp-admin2,195 ▲215.59 ▼0.0186.56 ▼5.7438.44 ▼1.15
Posts /wp-admin/edit.php2,097 ▼32.07 ▲0.0439.51 ▲1.4234.99 ▼2.30
Add New Post /wp-admin/post-new.php1,536 ▲822.98 ▼0.07658.63 ▼30.7656.52 ▼8.31
Media Library /wp-admin/upload.php1,397 ▼04.29 ▲0.07102.43 ▲3.4547.49 ▲2.73

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: permalink, url, slug, administration, seo

lh-better-slugs/lh-better-slugs.php Passed 13 tests

The main file in "LH Better Slugs" v. 1.00 serves as a complement to information provided in readme.txt and as the entry point to the plugin
97 characters long description:
Smartify your post and page slugs by removing too short or insignificant stopwords automatically.

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
No dangerous file extensions were detected65 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2651665

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods457.14%
▷ Public methods7100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin