84% font-fa

Code Review | Fonts Fa

WordPress plugin Fonts Fa scored84%from 54 tests.

About plugin

  • Plugin page: font-fa
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Mar 7, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: lusha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /121 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.03ms] Passed 4 tests

This is a short check of server-side resources used by Fonts Fa
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.81 ▼4.83
Dashboard /wp-admin3.31 ▲0.0051.71 ▼2.22
Posts /wp-admin/edit.php3.36 ▲0.0054.76 ▲1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.46 ▼13.26
Media Library /wp-admin/upload.php3.23 ▲0.0038.26 ▲0.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Fonts Fa
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.361.85 ▲0.2143.49 ▲3.37
Dashboard /wp-admin2,198 ▲245.67 ▲0.0683.18 ▼39.7239.73 ▼8.94
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0134.91 ▼0.7134.22 ▼3.36
Add New Post /wp-admin/post-new.php1,554 ▲2023.39 ▲0.01676.34 ▲8.0253.92 ▼1.79
Media Library /wp-admin/upload.php1,403 ▼04.31 ▲0.06100.99 ▼5.4143.23 ▼5.24

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 did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/font-fa/font-fa.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

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

The principal PHP file in "Fonts Fa" v. 1.2 is loaded by WordPress automatically on each request
66 characters long description:
just a simple plugin for add farsi google noto naskh font to site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin20 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP181211
CSS1409

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin