10% lao-fonts

Code Review | Lao Fonts

WordPress plugin Lao Fonts scored10%from 54 tests.

About plugin

  • Plugin page: lao-fonts
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 29, 2016
  • Latest release: Feb 23, 2021
  • Number of updates: 36
  • Update frequency: every 50.6 days
  • Top authors: frankkung (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /7,321 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/lao-fonts/main.php+46
    Trying to get property 'option_value' of non-object

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.71ms] Passed 4 tests

A check of server-side resources used by Lao Fonts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.376.00 ▼37.03
Dashboard /wp-admin2.11 ▼1.205.98 ▼47.04
Posts /wp-admin/edit.php2.11 ▼1.257.81 ▼42.54
Add New Post /wp-admin/post-new.php2.11 ▼3.785.52 ▼92.22
Media Library /wp-admin/upload.php2.11 ▼1.127.24 ▼29.85

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lao Fonts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.34 ▼0.241.87 ▼0.0248.06 ▲3.95
Dashboard /wp-admin2,217 ▲435.64 ▲0.0695.02 ▼1.7336.68 ▼8.43
Posts /wp-admin/edit.php2,122 ▲222.03 ▼0.1035.69 ▼1.6730.39 ▼8.70
Add New Post /wp-admin/post-new.php1,545 ▲1923.25 ▼0.36672.69 ▼34.5450.62 ▼5.83
Media Library /wp-admin/upload.php1,419 ▲224.20 ▲0.01114.37 ▲8.1940.67 ▼6.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/lao-fonts/main.php+46
    Trying to get property 'option_value' of non-object
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/lao-fonts/options.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: lao for wordpress, phetsarath wp, lao sans pro, saysettha, saysettha ot...

lao-fonts/main.php 85% from 13 tests

"Lao Fonts" version 2.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lao-fonts.php" instead of "main.php")
  • Description: The description should be shorter than 140 characters (currently 288 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,138 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG11901,572
PHP24120377
CSS171615189

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png28.12KB10.65KB▼ 62.14%
assets/facebook.png6.05KB3.26KB▼ 46.19%
assets/bcelone.png30.74KB13.54KB▼ 55.95%