94% vietnamese-slug

Code Review | Vietnamese slug

WordPress plugin Vietnamese slug scored 94% from 54 tests.

About plugin

  • Plugin page: vietnamese-slug
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 5.8.1
  • First release: Jul 16, 2015
  • Latest release: Sep 18, 2017
  • Number of updates: 11
  • Update frequency: every 72.3 days
  • Top authors: mcjambi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,292 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼136.79ms] Passed 4 tests

Server-side resources used by Vietnamese slug
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.91 ▲16.32
Dashboard /wp-admin3.08 ▲0.0249.41 ▲10.17
Posts /wp-admin/edit.php3.13 ▲0.0247.60 ▲9.47
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.60 ▼552.39
Media Library /wp-admin/upload.php3.02 ▲0.0129.69 ▼14.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Vietnamese slug: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4215.84 ▲0.199.09 ▲0.3156.83 ▲10.87
Dashboard /wp-admin2,967 ▲365.93 ▼0.18133.31 ▼11.58105.35 ▼7.14
Posts /wp-admin/edit.php2,736 ▼32.72 ▲0.0062.73 ▲0.8192.06 ▲7.19
Add New Post /wp-admin/post-new.php1,670 ▼619.10 ▲0.27380.28 ▲0.69105.58 ▼6.02
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.03141.93 ▼5.86121.21 ▲0.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
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 add_filter() in wp-content/plugins/vietnamese-slug/vietnamese_slug.php:53

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: tieng viet, permalink in vietnamese, duong dan tieng viet, vietnamese slug, nice permalink...

vietnamese-slug/vietnamese_slug.php 85% from 13 tests

"Vietnamese slug" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("vietnamese-slug.php" instead of "vietnamese_slug.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161335

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 files were detected