10% wp-farsi

Code Review | WP-Farsi

WordPress plugin WP-Farsi scored10%from 54 tests.

About plugin

  • Plugin page: wp-farsi
  • Plugin version: 4.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Mar 3, 2015
  • Latest release: May 9, 2016
  • Number of updates: 59
  • Update frequency: every 7.3 days
  • Top authors: Ali.Dbg (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /43,394 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-farsi/includes/pdate.php+3
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.86MB] [CPU: ▼57.62ms] Passed 4 tests

A check of server-side resources used by WP-Farsi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.58 ▼40.11
Dashboard /wp-admin2.15 ▼1.196.67 ▼57.80
Posts /wp-admin/edit.php2.15 ▼1.206.64 ▼37.78
Add New Post /wp-admin/post-new.php2.15 ▼3.736.15 ▼94.80
Media Library /wp-admin/upload.php2.15 ▼1.085.38 ▼29.35

Server storage [IO: ▲0.11MB] [DB: ▲0.53MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • There were 67 files (3,524.49KB) illegally modified outside of "wp-content/plugins/wp-farsi/" and "wp-content/uploads/"
    • (new file) wp-content/languages/admin-fa_IR.mo
    • (new file) wp-content/languages/fa_IR-17179a5f2930647c89151e365f843b6e.json
    • (new file) wp-content/languages/continents-cities-fa_IR.po
    • (new file) wp-content/languages/fa_IR-0cc31205f20441b3df1d1b46100f6b8d.json
    • (new file) wp-content/languages/fa_IR-0ce75ad2f775d1cac9696967d484808c.json
    • (new file) wp-content/languages/admin-fa_IR.po
    • (new file) wp-content/languages/admin-network-fa_IR.po
    • (new file) wp-content/languages/continents-cities-fa_IR.mo
    • (new file) wp-content/languages/admin-network-fa_IR.mo
    • (new file) wp-content/languages/fa_IR-0eebe503220d4a00341eb011b92769b4.json
    • ...
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
WPLANG
wpfa_nums

Browser metrics Passed 4 tests

WP-Farsi: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲8414.72 ▲0.371.81 ▲0.0178.26 ▲34.97
Dashboard /wp-admin2,201 ▲275.84 ▲0.2899.88 ▲11.8675.74 ▲40.45
Posts /wp-admin/edit.php2,339 ▲2392.08 ▲0.0641.99 ▲1.0068.09 ▲30.33
Add New Post /wp-admin/post-new.php1,608 ▲7324.22 ▲5.78677.14 ▲52.2273.35 ▼0.95
Media Library /wp-admin/upload.php1,402 ▼14.25 ▲0.0494.73 ▼0.0953.18 ▲14.32

Uninstaller [IO: ▲3.44MB] [DB: ▲0.53MB] 50% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-farsi/includes/pdate.php+3
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • WPLANG
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wpfa_nums
    • widget_recent-posts

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 | 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-farsi/includes/wpfa_admin.php:33

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (25 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-farsi/wp-farsi.php 92% from 13 tests

This is the main PHP file of "WP-Farsi" version 4.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 247 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected226 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32216201
CSS12318
JavaScript1006
HTML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin