83% dehkadeh-fonts

Code Review | Dehkadeh Fonts

WordPress plugin Dehkadeh Fonts scored83%from 54 tests.

About plugin

  • Plugin page: dehkadeh-fonts
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.3-7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Jul 8, 2021
  • Number of updates: 50
  • Update frequency: every 25.0 days
  • Top authors: dehkadehwp (96%)sajjad rezaee (6%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /10,832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.97ms] Passed 4 tests

An overview of server-side resources used by Dehkadeh Fonts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1641.94 ▼0.66
Dashboard /wp-admin3.47 ▲0.1753.15 ▼1.16
Posts /wp-admin/edit.php3.58 ▲0.2354.86 ▼0.01
Add New Post /wp-admin/post-new.php6.05 ▲0.1797.85 ▼6.05
Media Library /wp-admin/upload.php3.39 ▲0.1744.69 ▲6.80

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Dehkadeh Fonts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲2114.28 ▲0.011.60 ▼0.8438.22 ▼6.71
Dashboard /wp-admin2,214 ▲405.65 ▲0.0389.51 ▼11.1241.82 ▼3.02
Posts /wp-admin/edit.php2,116 ▲131.98 ▼0.0339.27 ▲2.7836.23 ▲0.53
Add New Post /wp-admin/post-new.php1,539 ▲1323.00 ▲0.04655.61 ▲39.2750.66 ▼1.89
Media Library /wp-admin/upload.php1,410 ▲134.21 ▲0.0096.76 ▼6.1644.82 ▲1.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dehkadeh-fonts/includes/settings.php:670
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dehkadeh-fonts/includes/wp-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dehkadeh-fonts/includes/functions.php:249
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/dehkadeh-fonts/dw-fonts.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Requires php: Version not formatted correctly
The official readme.txt might help

dehkadeh-fonts/dw-fonts.php 77% from 13 tests

The primary PHP file in "Dehkadeh Fonts" version 1.2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dehkadeh-fonts.php" instead of "dw-fonts.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "5.3-7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,877 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP518575957
SVG100700
PO File17274219
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin