84% arabic-webfonts

Code Review | Arabic Webfonts

WordPress plugin Arabic Webfonts scored84%from 54 tests.

About plugin

  • Plugin page: arabic-webfonts
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 22, 2015
  • Latest release: Mar 11, 2021
  • Number of updates: 42
  • Update frequency: every 51.2 days
  • Top authors: mandooox (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

9,000+ active /84,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼1.32ms] Passed 4 tests

Analyzing server-side resources used by Arabic Webfonts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3945.56 ▲5.56
Dashboard /wp-admin3.67 ▲0.3654.17 ▲2.99
Posts /wp-admin/edit.php3.78 ▲0.4350.50 ▲1.89
Add New Post /wp-admin/post-new.php6.25 ▲0.3790.11 ▼11.87
Media Library /wp-admin/upload.php3.59 ▲0.3638.82 ▲1.70
Add New Control /wp-admin/post-new.php?post_type=awf_font_control3.6246.13
All Controls /wp-admin/edit.php?post_type=awf_font_control3.6336.23

Server storage [IO: ▲0.18MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Arabic Webfonts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9014.79 ▲0.041.97 ▲0.2443.45 ▲0.60
Dashboard /wp-admin2,248 ▲425.83 ▲0.74100.26 ▼4.0042.49 ▼1.83
Posts /wp-admin/edit.php2,127 ▲272.02 ▼0.0436.74 ▼3.2235.15 ▼0.53
Add New Post /wp-admin/post-new.php1,573 ▲4221.14 ▼2.18640.94 ▼8.5066.12 ▲5.73
Media Library /wp-admin/upload.php1,427 ▲304.23 ▲0.02100.56 ▼0.5850.85 ▲5.03
Add New Control /wp-admin/post-new.php?post_type=awf_font_control1,4282.4747.9046.74
All Controls /wp-admin/edit.php?post_type=awf_font_control1,0591.9833.5629.60

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=awf_font_control
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: arabic fonts, wordpress fonts, fonts, arabic webfonts, wordpress customizer...

arabic-webfonts/arabic-webfonts.php 92% from 13 tests

The principal PHP file in "Arabic Webfonts" v. 1.4.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,695 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP165007532,066
JavaScript27284212
PO File163116181
JSON300120
Markdown129066
CSS18350

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity22.64
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods64
▷ Static methods57.81%
▷ Public methods5992.19%
▷ Protected methods00.00%
▷ Private methods57.81%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.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
No PNG files were detected