78% permalink-persian-to-english

Code Review | WP Permalink Persian To English

WordPress plugin WP Permalink Persian To English scored78%from 54 tests.

About plugin

  • Plugin page: permalink-persian...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Feb 13, 2014
  • Number of updates: 19
  • Update frequency: every 0.5 days
  • Top authors: navid_x66 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /2,915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.46ms] Passed 4 tests

A check of server-side resources used by WP Permalink Persian To English
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.03 ▼1.15
Dashboard /wp-admin3.35 ▲0.0454.20 ▲0.63
Posts /wp-admin/edit.php3.40 ▲0.0452.24 ▲2.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.05 ▼1.16
Media Library /wp-admin/upload.php3.27 ▲0.0435.38 ▼0.15
مترجم پیوند یکتا /wp-admin/options-general.php?page=permalink-persian-to-english/fa-to-en-translate-admin.php3.2131.42

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 11 new options
New WordPress options
wp_novinweb_translate_clientsecret
widget_theysaidso_widget
wp_novinweb_translate_language
db_upgraded
wp_novinweb_translate_deactivate
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
wp_novinweb_translate_clientid
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Permalink Persian To English
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.22 ▼0.511.70 ▼0.2144.07 ▼0.37
Dashboard /wp-admin2,199 ▲285.62 ▼0.0589.15 ▼10.8042.80 ▼3.24
Posts /wp-admin/edit.php2,104 ▲72.01 ▼0.0139.38 ▲2.8539.34 ▲5.39
Add New Post /wp-admin/post-new.php1,529 ▲123.59 ▲0.54676.97 ▼18.6962.68 ▲12.20
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0892.55 ▼17.1351.20 ▲1.34
مترجم پیوند یکتا /wp-admin/options-general.php?page=permalink-persian-to-english/fa-to-en-translate-admin.php8641.9921.9056.11

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • wp_novinweb_translate_clientsecret
    • wp_novinweb_translate_language
    • wp_novinweb_translate_hamahangi
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp_novinweb_translate_clientid
    • wp_novinweb_translate_deactivate
    • ...

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
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=permalink-persian-to-english/fa-to-en-translate-admin.php
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=permalink-persian-to-english/fa-to-en-translate-admin.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/permalink-persian-to-english/fa-to-en-translate.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/permalink-persian-to-english/fa-to-en-translate-admin.php:163

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot 1.2. Screenshot 2.) image missing
The official readme.txt might help

permalink-persian-to-english/fa-to-en-translate.php 92% from 13 tests

The entry point to "WP Permalink Persian To English" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("permalink-persian-to-english.php" instead of "fa-to-en-translate.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
No dangerous file extensions were detected198 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23311198

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.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity3.00
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.33KB4.04KB▼ 69.71%
screenshot-2.png40.13KB18.96KB▼ 52.76%