77% wp-parsi-permalink-translator

Code Review | WP-Parsi Permalink Translator

WordPress plugin WP-Parsi Permalink Translator scored77%from 54 tests.

About plugin

  • Plugin page: wp-parsi-permalin...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2015
  • Latest release: Dec 31, 2016
  • Number of updates: 36
  • Update frequency: every 17.5 days
  • Top authors: parselearn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,242 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.64MB] [CPU: ▼16.68ms] Passed 4 tests

An overview of server-side resources used by WP-Parsi Permalink Translator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.22 ▼2.81
Dashboard /wp-admin3.37 ▲0.0749.73 ▲0.36
Posts /wp-admin/edit.php3.42 ▲0.0648.80 ▼2.44
Add New Post /wp-admin/post-new.php3.13 ▼2.7627.19 ▼61.81
Media Library /wp-admin/upload.php3.29 ▲0.0635.14 ▲4.20
Permalink Translator /wp-admin/options-general.php?page=wpp-permalink-translator3.2327.62

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
wpp-permalink-translator

Browser metrics Passed 4 tests

A check of browser resources used by WP-Parsi Permalink Translator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.32 ▼1.075.08 ▲2.9043.55 ▼3.18
Dashboard /wp-admin2,210 ▲224.85 ▼1.03109.76 ▼4.3139.89 ▼4.41
Posts /wp-admin/edit.php2,093 ▲12.03 ▲0.0539.15 ▲1.4932.45 ▼3.18
Add New Post /wp-admin/post-new.php1,517 ▼217.47 ▼6.00613.25 ▼41.6450.08 ▼0.06
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0495.84 ▼3.9742.44 ▲0.72
Permalink Translator /wp-admin/options-general.php?page=wpp-permalink-translator1,1871.6826.4928.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • wpp-permalink-translator
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+226
    Undefined index: key
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: page
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: oembed_cache
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: user_request
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: wp_block
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: wp_template
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: wp_template_part
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: wp_global_styles
    • > GET request to /wp-admin/options-general.php?page=wpp-permalink-translator
    • > Notice in wp-content/plugins/wp-parsi-permalink-translator/wpppt.php+248
    Undefined index: wp_navigation

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix 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/wp-parsi-permalink-translator/wpppt.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Settings Page), #2 (Translate Post Title.)
The official readme.txt is a good inspiration

wp-parsi-permalink-translator/wpppt.php 69% from 13 tests

The main PHP script in "WP-Parsi Permalink Translator" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-parsi-permalink-translator.php" instead of "wpppt.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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 detected398 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24411272
PO File1103200126

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.82KB6.63KB▼ 60.57%
screenshot-2.png19.80KB8.29KB▼ 58.14%