90% persian-gravity-forms

Code Review | گرویتی فرم فارسی

WordPress plugin گرویتی فرم فارسی scored 90% from 54 tests.

About plugin

  • Plugin page: persian-gravity-f...
  • Plugin version: 2.7.7.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 6, 2014
  • Latest release: Jun 6, 2023
  • Number of updates: 101
  • Update frequency: every 30.7 days
  • Top authors: hannanstd (93.07%)Persianscript (7.92%)

Code review

54 tests

User reviews

34 reviews

Install metrics

30,000+ active / 248,532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by گرویتی فرم فارسی
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.68 ▼0.58
Dashboard /wp-admin3.34 ▲0.0450.92 ▲2.90
Posts /wp-admin/edit.php3.39 ▲0.0444.33 ▼7.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.01 ▼16.88
Media Library /wp-admin/upload.php3.27 ▲0.0435.60 ▼7.18

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

گرویتی فرم فارسی: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.32 ▼0.884.81 ▲3.1644.61 ▲2.13
Dashboard /wp-admin2,215 ▲274.86 ▼0.9998.85 ▲0.2341.33 ▼5.68
Posts /wp-admin/edit.php2,094 ▲52.01 ▲0.0335.60 ▲0.9636.38 ▲4.12
Add New Post /wp-admin/post-new.php1,542 ▲923.35 ▲0.19681.58 ▲12.7355.66 ▼5.67
Media Library /wp-admin/upload.php1,385 ▼04.29 ▲0.0996.72 ▼9.6243.45 ▼4.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: gravityforms, iran

persian-gravity-forms/index.php 92% from 13 tests

The main file in "گرویتی فرم فارسی" v. 2.7.7.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("persian-gravity-forms.php" instead of "index.php")

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
There were no executable files found in this plugin26,347 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,8755,08114,780
PO File32,7333,1026,960
JavaScript779104,450
CSS6310157

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity72.47
▷ Minimum class complexity1.00
▷ Maximum class complexity389.00
Average method complexity7.90
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods445
▷ Static methods245.39%
▷ Public methods43998.65%
▷ Protected methods00.00%
▷ Private methods61.35%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/Gravity_Forms_fa.png138.41KB35.47KB▼ 74.37%
assets/images/logo.png3.03KB1.62KB▼ 46.58%