84% thai-fonts-for-elementor

Code Review | Thai Fonts for Elementor

WordPress plugin Thai Fonts for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: thai-fonts-for-el...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2021
  • Latest release: Feb 4, 2021
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: coombco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /623 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.03MB] [CPU: ▼10.92ms] Passed 4 tests

This is a short check of server-side resources used by Thai Fonts for Elementor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0426.65 ▼18.11
Dashboard /wp-admin3.35 ▲0.0451.22 ▼1.12
Posts /wp-admin/edit.php3.46 ▲0.1050.48 ▼1.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.35 ▼19.19
Media Library /wp-admin/upload.php3.27 ▲0.0438.71 ▼5.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 120 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Thai Fonts for Elementor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.69 ▼0.511.85 ▼0.1943.31 ▼0.75
Dashboard /wp-admin2,232 ▲475.84 ▼0.02106.23 ▼13.2439.59 ▼6.24
Posts /wp-admin/edit.php2,115 ▲262.05 ▲0.0839.63 ▲2.7834.98 ▼0.26
Add New Post /wp-admin/post-new.php1,534 ▲1223.20 ▼0.31665.96 ▼12.5052.63 ▼0.64
Media Library /wp-admin/upload.php1,414 ▲294.23 ▲0.07103.43 ▼28.4146.09 ▼15.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Addtional_Thai_Fonts' not found in wp-content/plugins/thai-fonts-for-elementor/core/views/tfe-admin-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Install and see fonts live in Elementor!)
Please take inspiration from this readme.txt

thai-fonts-for-elementor/thai-fonts-for-elementor.php Passed 13 tests

"Thai Fonts for Elementor" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
A simple plugin that dynamically enqueue selected Thai language fonts, and make them available in the Elementor\'s Editor

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 plugin686 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS131647500
PHP7102263186
JavaScript1030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods18
▷ Static methods15.56%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin