10% wp-jalali

Code Review | wp-jalali

WordPress plugin wp-jalali scored10%from 54 tests.

About plugin

  • Plugin page: wp-jalali
  • Plugin version: 5.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2007
  • Latest release: Oct 23, 2016
  • Number of updates: 71
  • Update frequency: every 49.3 days
  • Top authors: Gonahkar (50.7%)mani_monaj (50.7%)

Code review

54 tests

User reviews

21 reviews

Install metrics

40,000+ active /380,133 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
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-jalali/lib/date.php+96
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.83MB] [CPU: ▼54.47ms] Passed 4 tests

Analyzing server-side resources used by wp-jalali
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.315.73 ▼39.55
Dashboard /wp-admin2.18 ▼1.136.73 ▼44.10
Posts /wp-admin/edit.php2.18 ▼1.186.91 ▼41.23
Add New Post /wp-admin/post-new.php2.18 ▼3.717.51 ▼93.00
Media Library /wp-admin/upload.php2.18 ▼1.067.45 ▼23.76
About /wp-admin/admin.php?page=ztjalali_help_page2.187.26
WP Jalali /wp-admin/admin.php?page=ztjalali_admin_page2.187.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
db_upgraded
ztjalali_version
ztjalali_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_ztjalali_calendar
widget_ztjalali_archive

Browser metrics Passed 4 tests

An overview of browser requirements for wp-jalali
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.30 ▼0.984.48 ▲2.7839.90 ▼6.69
Dashboard /wp-admin2,241 ▲534.90 ▲0.02108.39 ▲2.1248.70 ▲5.84
Posts /wp-admin/edit.php2,123 ▲312.06 ▲0.0540.41 ▼0.8939.21 ▲4.95
Add New Post /wp-admin/post-new.php1,549 ▲1223.22 ▼0.04609.33 ▲14.8056.05 ▲6.41
Media Library /wp-admin/upload.php1,420 ▲384.28 ▲0.06101.30 ▲4.4744.87 ▲2.65
About /wp-admin/admin.php?page=ztjalali_help_page1,0861.8429.21128.19
WP Jalali /wp-admin/admin.php?page=ztjalali_admin_page1,0851.7128.3534.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-jalali/lib/date.php+96
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_theysaidso_widget
    • ztjalali_version
    • widget_recent-comments
    • ztjalali_options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_ztjalali_calendar
    • db_upgraded
    • widget_ztjalali_archive

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
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ztjalali_admin_page
    • > Deprecated in wp-content/plugins/wp-jalali/lib/date.php+262
    Array and string offset access syntax with curly braces is deprecated
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ztjalali_admin_page
    • > Deprecated in wp-content/plugins/wp-jalali/lib/date.php+353
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
    • > GET request to /wp-admin/admin.php?page=ztjalali_help_page
    • > Notice in wp-content/plugins/wp-jalali/inc/wp-jalali-help-page.php+199
    Undefined variable: tour_cnt

SRP 50% 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
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-jalali/wp-jalali-init.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-jalali/inc/wp-jalali-admin-option.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 74
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 77
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 49
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 62
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-jalali/inc/wp-jalali-admin.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-jalali/inc/wp-jalali-filters.php on line 52

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 errors were detected

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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Preview of wp-jalali's Custom Admin Page) image not found
You can take inspiration from this readme.txt

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

"wp-jalali" version 5.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin2,788 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP133765662,040
JavaScript37345436
CSS42029150
PO File163146149
SVG10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity10.00
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/zakrot.com.png5.06KB1.65KB▼ 67.40%
assets/icon-128x128.png10.30KB3.82KB▼ 62.89%
assets/icon-256x256.png13.65KB4.67KB▼ 65.82%
screenshot-1.png142.92KB48.81KB▼ 65.85%
assets/banner-772x250.png32.25KB12.20KB▼ 62.18%