83% persian-font-manager

Code Review | Persian Font Manager

WordPress plugin Persian Font Manager scored83%from 54 tests.

About plugin

  • Plugin page: persian-font-manager
  • Plugin version: 1.0....
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 21, 2021
  • Latest release: Jan 31, 2023
  • Number of updates: 7
  • Update frequency: every 67.0 days
  • Top authors: davoodjafary (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /497 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.02MB] [CPU: ▼5.12ms] Passed 4 tests

A check of server-side resources used by Persian Font Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.02 ▼7.16
Dashboard /wp-admin3.32 ▲0.0248.39 ▼1.32
Posts /wp-admin/edit.php3.37 ▲0.0249.01 ▲1.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.13 ▼13.12
Media Library /wp-admin/upload.php3.25 ▲0.0237.07 ▲3.55
Persian Font Manager /wp-admin/tools.php?page=wpfm-persian3.2131.78

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 275 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Persian Font Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.014.12 ▲2.4236.88 ▼6.91
Dashboard /wp-admin2,213 ▲285.86 ▲0.0697.79 ▼6.0138.80 ▲0.24
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0138.82 ▲2.9835.20 ▼4.56
Add New Post /wp-admin/post-new.php1,517 ▼1617.61 ▼5.82683.27 ▲36.6353.18 ▼12.20
Media Library /wp-admin/upload.php1,395 ▲74.27 ▲0.0898.65 ▼4.2347.55 ▲3.99
Persian Font Manager /wp-admin/tools.php?page=wpfm-persian9912.0623.7528.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPFM_Persian\\plugin_dir_url() in wp-content/plugins/persian-font-manager/index.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 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
No tags were detected

persian-font-manager/index.php 77% from 13 tests

The principal PHP file in "Persian Font Manager" v. 1.0.... is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("persian-font-manager.php" instead of "index.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1.0....")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin42,466 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
SVG220040,376
CSS173402071,838
PHP23646177
PO File19331,83975

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods321.43%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin