78% font-farsi

Code Review | Font Farsi

WordPress plugin Font Farsi scored78%from 54 tests.

About plugin

  • Plugin page: font-farsi
  • Plugin version: 1.6.6
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Apr 22, 2020
  • Latest release: Jun 15, 2022
  • Number of updates: 100
  • Update frequency: every 7.8 days
  • Top authors: khl32 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /29,033 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.93MB] [CPU: ▲13.25ms] Passed 4 tests

An overview of server-side resources used by Font Farsi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /7.23 ▲3.7670.59 ▲31.59
Dashboard /wp-admin7.34 ▲3.9959.69 ▲3.14
Posts /wp-admin/edit.php7.39 ▲4.0363.12 ▲18.97
Add New Post /wp-admin/post-new.php9.87 ▲3.99105.77 ▲10.47
Media Library /wp-admin/upload.php7.20 ▲3.9755.43 ▲20.42
راهنما /wp-admin/admin.php?page=font-farsi-help7.1643.95
فونت فارسی /wp-admin/admin.php?page=font-farsi-main7.2885.26
فونت سفارشی /wp-admin/admin.php?page=font-farsi-custom-font7.36123.54

Server storage [IO: ▲2.88MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics 75% from 4 tests

This is an overview of browser requirements for Font Farsi
Having an awesome user experience is important, so please improve the following
  • Nodes: Try to keep the DOM nodes under 25,000 (currently 27,189 on /wp-admin/admin.php?page=font-farsi-custom-font)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12313.72 ▼0.901.93 ▲0.3542.32 ▲3.29
Dashboard /wp-admin2,246 ▲665.56 ▼0.0494.57 ▲4.3844.39 ▲5.36
Posts /wp-admin/edit.php2,154 ▲572.61 ▲0.6144.13 ▲9.8134.57 ▼0.55
Add New Post /wp-admin/post-new.php1,566 ▲3723.74 ▲0.83698.44 ▲51.8653.09 ▼1.55
Media Library /wp-admin/upload.php1,451 ▲485.14 ▲0.96109.57 ▲14.9647.34 ▲2.37
راهنما /wp-admin/admin.php?page=font-farsi-help8962.3235.4441.56
فونت فارسی /wp-admin/admin.php?page=font-farsi-main13,1453.57105.74105.17
فونت سفارشی /wp-admin/admin.php?page=font-farsi-custom-font27,1894.49176.40157.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/font-farsi/class/class-custom-font-panel-cb.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=font-farsi-main
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=font-farsi-main 177 The specified value "/" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/admin.php?page=font-farsi-main
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=font-farsi-main 580 The specified value "/" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/admin.php?page=font-farsi-main
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=font-farsi-main 979 The specified value "/" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/admin.php?page=font-farsi-main
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=font-farsi-main 1378 The specified value "/" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/admin.php?page=font-farsi-main
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=font-farsi-main 1778 The specified value "/" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/admin.php?page=font-farsi-main
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=font-farsi-main 2176 The specified value "/" cannot be parsed, or is out of range.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: farsi, site font, font, custom css, persian...

font-farsi/font-farsi.php Passed 13 tests

"Font Farsi" version 1.6.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
31 characters long description:
Add Persian Fonts To Your Site.

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
There were no executable files found in this plugin31,235 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript162,5062,22617,304
PHP241,02849511,387
CSS10150981,668
SVG100643
PO File1104584233

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.02
Average class complexity5.77
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods81
▷ Static methods22.47%
▷ Public methods7997.53%
▷ Protected methods22.47%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/plus.png6.00KB2.03KB▼ 66.21%
assets/img/negative.png5.82KB1.95KB▼ 66.47%
assets/img/toggle-open.png0.23KB0.23KB▼ 1.28%
assets/img/toggle-close.png0.23KB0.23KB▼ 2.11%