77% parsi-font

Code Review | MW Font Changer

WordPress plugin MW Font Changer scored77%from 54 tests.

About plugin

  • Plugin page: parsi-font
  • Plugin version: 5.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Apr 23, 2023
  • Number of updates: 92
  • Update frequency: every 36.7 days
  • Top authors: Shahrakdownload (61.96%)Ghaem (39.13%)

Code review

54 tests

User reviews

30 reviews

Install metrics

10,000+ active /190,931 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
Installer ran successfully

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

Server-side resources used by MW Font Changer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0324.28 ▼17.24
Dashboard /wp-admin3.37 ▲0.0647.06 ▼1.73
Posts /wp-admin/edit.php3.42 ▲0.0650.21 ▲0.93
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.41 ▼22.46
Media Library /wp-admin/upload.php3.29 ▲0.0639.65 ▲6.40

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 111 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for MW Font Changer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7613.29 ▼1.024.14 ▲1.8838.80 ▼6.86
Dashboard /wp-admin2,234 ▲525.85 ▼0.06101.29 ▼0.3247.81 ▲3.88
Posts /wp-admin/edit.php2,114 ▲252.14 ▲0.0936.45 ▼1.5137.64 ▲3.00
Add New Post /wp-admin/post-new.php1,552 ▲1822.97 ▲4.70670.83 ▲19.2450.99 ▼13.99
Media Library /wp-admin/upload.php1,419 ▲314.23 ▲0.04111.76 ▲14.0249.14 ▲5.31
MW Font Changer - Theme /wp-admin/mwfc-theme-font.php260.440.0814.81
MW Font Changer - Dashboard /wp-admin/mwfc-dashboard-font.php260.440.077.15

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/parsi-font/includes/help.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/parsi-font/includes/pro.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/parsi-font/includes/plugin-dashboard-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/parsi-font/includes/plugin-theme-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/parsi-font/includes/wp-head-codes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/parsi-font/includes/feedback.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/parsi-font/includes/admin-head-codes.php:2

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/mwfc-theme-font.php
    • > Network (severe)
    wp-admin/mwfc-theme-font.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/mwfc-dashboard-font.php
    • > Network (severe)
    wp-admin/mwfc-dashboard-font.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Dashboard font settings page), #2 (Theme font settings page)
  • Tags: Please reduce the number of tags, currently 32 tag instead of maximum 10
Please take inspiration from this readme.txt

parsi-font/mw-font-changer.php 85% from 13 tests

This is the main PHP file of "MW Font Changer" version 5.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("parsi-font.php" instead of "mw-font-changer.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
Success! There were no dangerous files found in this plugin5,607 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS6257131,545
PHP1036181,050
PO File189122295
JavaScript191746

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.30MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/classiden.png24.77KB12.06KB▼ 51.30%
screenshot-2.png206.07KB61.68KB▼ 70.07%
assets/images/classidfa.png21.95KB10.70KB▼ 51.25%
screenshot-1.png52.54KB22.25KB▼ 57.64%