89% pojo-custom-fonts

Code Review | Pojo Custom Fonts

WordPress plugin Pojo Custom Fonts scored89%from 54 tests.

About plugin

  • Plugin page: pojo-custom-fonts
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 29, 2015
  • Latest release: Jul 23, 2023
  • Number of updates: 27
  • Update frequency: every 111.4 days
  • Top authors: KingYes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

8,000+ active /55,925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.48ms] Passed 4 tests

Analyzing server-side resources used by Pojo Custom Fonts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.21 ▼4.18
Dashboard /wp-admin3.39 ▲0.0952.07 ▼0.92
Posts /wp-admin/edit.php3.44 ▲0.0852.67 ▼4.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.33 ▼4.72
Media Library /wp-admin/upload.php3.32 ▲0.0941.33 ▲0.97
Custom Fonts /wp-admin/edit-tags.php?taxonomy=pojo_custom_fonts3.3136.59

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pojo Custom Fonts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.041.73 ▼0.1243.73 ▼1.07
Dashboard /wp-admin2,198 ▲185.58 ▼0.0992.39 ▼9.8642.67 ▼0.13
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0337.92 ▲2.6234.35 ▼3.51
Add New Post /wp-admin/post-new.php1,528 ▲223.11 ▼0.04660.61 ▼40.6755.80 ▼5.37
Media Library /wp-admin/upload.php1,400 ▼04.15 ▲0.0196.19 ▼19.8545.47 ▼2.14
Custom Fonts /wp-admin/edit-tags.php?taxonomy=pojo_custom_fonts1,2812.1327.8730.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Add new custom font), #2 (Select your custom font in Customizer)
Please take inspiration from this readme.txt

pojo-custom-fonts/pojo-custom-fonts.php 85% from 13 tests

"Pojo Custom Fonts" version 1.0.5'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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 223 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin347 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47056281
PO File1264466

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes4100.00%
Methods28
▷ Static methods13.57%
▷ Public methods2382.14%
▷ Protected methods414.29%
▷ Private methods13.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.45MB with 0.30MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png156.13KB53.56KB▼ 65.70%
screenshot-2.png302.15KB95.37KB▼ 68.44%