77% wp-parsidate

Code Review | Parsi Date

WordPress plugin Parsi Date scored77%from 54 tests.

About plugin

  • Plugin page: wp-parsidate
  • Plugin version: 4.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2014
  • Latest release: Jan 21, 2023
  • Number of updates: 203
  • Update frequency: every 16.3 days
  • Top authors: parselearn (76.85%)man4toman (14.78%)lord_viper (3.94%)iEhsan.ir (3.45%)mostafa.s1990 (2.96%)

Code review

54 tests

User reviews

109 reviews

Install metrics

100,000+ active /644,492 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.47MB] [CPU: ▲4.18ms] Passed 4 tests

A check of server-side resources used by Parsi Date
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4346.01 ▲3.24
Dashboard /wp-admin3.81 ▲0.5152.88 ▲4.43
Posts /wp-admin/edit.php3.86 ▲0.5153.95 ▲5.59
Add New Post /wp-admin/post-new.php6.42 ▲0.54102.72 ▲3.47
Media Library /wp-admin/upload.php3.67 ▲0.4441.87 ▲7.12

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 75 new files
Database: no new tables, 9 new options
New WordPress options
widget_parsidate_archive
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
wpp_settings
widget_recent-posts
theysaidso_admin_options
widget_parsidate_calendar

Browser metrics Passed 4 tests

This is an overview of browser requirements for Parsi Date
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.25 ▼1.345.00 ▲3.2245.45 ▲3.86
Dashboard /wp-admin2,233 ▲455.82 ▼0.06107.66 ▲4.7042.21 ▼3.88
Posts /wp-admin/edit.php2,135 ▲432.04 ▼0.0042.62 ▲1.4242.41 ▲4.02
Add New Post /wp-admin/post-new.php1,563 ▲1618.38 ▲0.21636.04 ▼3.8154.19 ▼3.01
Media Library /wp-admin/upload.php1,412 ▲244.25 ▲0.02101.53 ▼2.8947.19 ▲0.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_parsidate_archive
    • can_compress_scripts
    • widget_parsidate_calendar
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • wpp_settings
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 25× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-parsidate/includes/settings.php
    • > /wp-content/plugins/wp-parsidate/includes/fixes-archives.php
    • > /wp-content/plugins/wp-parsidate/includes/admin/widgets.php
    • > /wp-content/plugins/wp-parsidate/includes/fixes-misc.php
    • > /wp-content/plugins/wp-parsidate/includes/admin/gutenberg-jalali-calendar.php
    • > /wp-content/plugins/wp-parsidate/includes/fixes-calendar.php
    • > /wp-content/plugins/wp-parsidate/includes/general.php
    • > /wp-content/plugins/wp-parsidate/includes/plugins/acf-fields/class-wpp-acf-datepicker-v4.php
    • > /wp-content/plugins/wp-parsidate/includes/install.php
    • > /wp-content/plugins/wp-parsidate/includes/plugins/acf-fields/class-wpp-acf-timepicker-v4.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-parsidate/includes/admin/datepicker-rtl.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-parsidate/languages/common-strings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-parsidate/includes/plugins/fixes-woo.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Plugin main settings), #2 (Number conversions settings), #3 (Other plugin compatibility), #4 (Persian datepicker in WooCommerce), #5 (Persian date type in ACF)
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-parsidate/wp-parsidate.php 77% from 13 tests

The main file in "Parsi Date" v. 4.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 246 characters long)
  • Domain Path: Prefix the domain path with a forward slash character ("/parsi-languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("parsi-languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin4,710 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP287141,3262,838
JavaScript82381831,068
CSS167712585
PO File17697204
SVG13015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity19.92
▷ Minimum class complexity3.00
▷ Maximum class complexity116.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods85
▷ Static methods78.24%
▷ Public methods7689.41%
▷ Protected methods00.00%
▷ Private methods910.59%
Functions74
▷ Named functions74100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.24MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrow-down.png1.35KB0.43KB▼ 68.07%
screenshot-5.png13.54KB6.55KB▼ 51.67%
screenshot-3.png33.79KB15.46KB▼ 54.26%
assets/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
screenshot-4.png34.82KB16.64KB▼ 52.22%