10% pp-thai-url

Code Review | PP Auto Thai URL

WordPress plugin PP Auto Thai URL scored10%from 54 tests.

About plugin

  • Plugin page: pp-thai-url
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2011
  • Latest release: Dec 26, 2011
  • Number of updates: 56
  • Update frequency: every 2.1 days
  • Top authors: preukson (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /16,310 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/pp-thai-url/pp_thai_url.php+21
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/pp-thai-url/pp_thai_url.php:21
    Stack trace:
    #0 wp-content/plugins/pp-thai-url/pp_thai_url.php(12): pp_set_db()
    #1 wp-includes/class-wp-hook.php(310): pp_full_url_activation()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

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

Server-side resources used by PP Auto Thai URL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.03 ▼6.75
Dashboard /wp-admin3.31 ▲0.0054.28 ▼2.81
Posts /wp-admin/edit.php3.36 ▲0.0055.21 ▲4.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.79 ▼4.64
Media Library /wp-admin/upload.php3.23 ▲0.0038.27 ▼1.71

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PP Auto Thai URL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.69 ▲0.412.31 ▲0.4342.71 ▼2.08
Dashboard /wp-admin2,195 ▲275.63 ▼0.0087.55 ▼4.2541.09 ▼3.06
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0140.52 ▲3.3336.28 ▼2.16
Add New Post /wp-admin/post-new.php1,526 ▼223.15 ▼0.09651.75 ▼26.5754.72 ▲1.51
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0198.62 ▼1.4449.17 ▲6.68

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
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/pp-thai-url/pp_thai_url.php:10

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (URL ในเว็บเราจะเปลี่ยนไปทันตาเห็น), #2 (ที่ Google ก็จะเปลี่ยนไปด้วย แต่อาจจะต้อใช้เวลาซักหน่อย)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === pp-thai-url === )
The official readme.txt might help

pp-thai-url/pp_thai_url.php 85% from 13 tests

"PP Auto Thai URL" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pp-thai-url.php" instead of "pp_thai_url.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 256 characters long)

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
Success! There were no dangerous files found in this plugin168 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13218168

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png67.40KB21.38KB▼ 68.28%
screenshot-1.png64.67KB21.01KB▼ 67.51%