99% typecase

Code Review | Typecase Web Fonts

WordPress plugin Typecase Web Fonts scored 99% from 54 tests.

About plugin

  • Plugin page: typecase
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.3
  • WordPress version: 5.8.1
  • First release: Apr 22, 2012
  • Latest release: Oct 1, 2015
  • Number of updates: 40
  • Update frequency: every 31.4 days
  • Top authors: chriswallace (97.5%)Christian1012 (5%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 27,682 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼157.76ms] Passed 4 tests

Server-side resources used by Typecase Web Fonts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1329.20 ▼17.09
Dashboard /wp-admin3.19 ▲0.1248.05 ▼41.11
Posts /wp-admin/edit.php3.27 ▲0.1754.87 ▲2.39
Add New Post /wp-admin/post-new.php5.54 ▲0.11101.83 ▼571.91
Media Library /wp-admin/upload.php3.13 ▲0.1338.80 ▼0.94

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 37 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Typecase Web Fonts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲8415.87 ▲0.668.12 ▼7.4956.10 ▼15.09
Dashboard /wp-admin2,979 ▲365.90 ▲0.01174.07 ▼12.99146.03 ▼9.59
Posts /wp-admin/edit.php2,759 ▲202.59 ▼0.1483.31 ▲7.2698.58 ▲1.83
Add New Post /wp-admin/post-new.php1,696 ▲1318.55 ▲2.31424.83 ▼21.15127.71 ▲1.55
Media Library /wp-admin/upload.php1,770 ▼344.99 ▼0.04148.31 ▼50.56146.22 ▲16.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

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 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Edit your website's web fonts easily with Typecase.), #2 (Instantly search Google Web Fonts' selection of over 500 web fonts, all optimized for the web.), #3 (Take a peek at your beautiful fonts on the front-end of your website. Ahhh, so pretty.)
Please take inspiration from this readme.txt

typecase/typecase.php Passed 13 tests

The primary PHP file in "Typecase Web Fonts" version 1.1.3 is used by WordPress to initiate all plugin functionality
74 characters long description:
A plugin that makes it dead simple to add custom webfonts to your website.

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
No dangerous file extensions were detected4,721 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS41318291,685
Sass327411,366
PHP2281357860
JavaScript422162543
SVG100238
HTML19024
Ruby16135

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods3090.91%
▷ Protected methods26.06%
▷ Private methods13.03%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 1.27MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png61.79KB23.73KB▼ 61.59%
screenshot-3.png782.21KB282.06KB▼ 63.94%
images/logo_typecase.png2.49KB0.89KB▼ 64.27%
images/circle_background.png2.58KB0.68KB▼ 73.53%
images/logo_typecase_small.png2.66KB1.33KB▼ 49.89%