84% elegant-custom-fonts

Code Review | Elegant Custom Fonts

WordPress plugin Elegant Custom Fonts scored84%from 54 tests.

About plugin

  • Plugin page: elegant-custom-fonts
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 17, 2018
  • Latest release: Aug 14, 2023
  • Number of updates: 7
  • Update frequency: every 286.3 days
  • Top authors: louisreingold (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

5,000+ active /20,084 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.57ms] Passed 4 tests

Analyzing server-side resources used by Elegant Custom Fonts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.70 ▲3.22
Dashboard /wp-admin3.34 ▲0.0449.52 ▼1.03
Posts /wp-admin/edit.php3.39 ▲0.0446.03 ▼1.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.35 ▼12.32
Media Library /wp-admin/upload.php3.27 ▲0.0435.79 ▲0.22
Fonts /wp-admin/options-general.php?page=Elegant_Custom_Fonts3.2331.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Elegant Custom Fonts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.73 ▲0.191.73 ▲0.1542.73 ▲1.16
Dashboard /wp-admin2,210 ▲224.84 ▼0.10111.89 ▼12.3342.02 ▼20.50
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0435.35 ▲0.6933.59 ▼1.84
Add New Post /wp-admin/post-new.php1,536 ▲323.25 ▼0.09668.91 ▼9.8751.19 ▲0.33
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.02121.22 ▲13.1348.07 ▲3.65
Fonts /wp-admin/options-general.php?page=Elegant_Custom_Fonts8321.6824.4124.71

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-custom-fonts/elegant-custom-fonts.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: woff, webfont, font face, typography, custom fonts...

elegant-custom-fonts/elegant-custom-fonts.php 92% from 13 tests

Analyzing the main PHP file in "Elegant Custom Fonts" version 1.0.1
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 277 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected318 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP216624318

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.50
▷ Minimum class complexity11.00
▷ Maximum class complexity18.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 images were found in this plugin