83% typekit-fonts-for-wordpress

Code Review | Typekit Fonts for WordPress

WordPress plugin Typekit Fonts for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: typekit-fonts-for...
  • Plugin version: 1.9.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9
  • WordPress version: 6.3.1
  • First release: Nov 18, 2009
  • Latest release: Dec 5, 2017
  • Number of updates: 66
  • Update frequency: every 46.0 days
  • Top authors: jamescollins (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20,000+ active /291,592 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.53ms] Passed 4 tests

Analyzing server-side resources used by Typekit Fonts for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.83 ▼5.11
Dashboard /wp-admin3.38 ▲0.0750.39 ▼1.71
Posts /wp-admin/edit.php3.49 ▲0.1355.31 ▲0.99
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.94 ▼4.27
Media Library /wp-admin/upload.php3.30 ▲0.0739.53 ▲1.58

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Typekit Fonts for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.23 ▼0.231.63 ▼0.0242.34 ▼0.27
Dashboard /wp-admin2,199 ▲195.65 ▲0.0290.54 ▼6.9442.82 ▲1.25
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0240.41 ▲2.4939.05 ▲3.27
Add New Post /wp-admin/post-new.php1,529 ▼623.23 ▲5.02671.30 ▲28.3753.52 ▼20.15
Media Library /wp-admin/upload.php1,404 ▲74.22 ▲0.0397.05 ▼5.4647.70 ▲3.22
Typekit Fonts /wp-admin/typekit-admin.php260.420.0915.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • OM4_Typekit

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/typekit-admin.php
    • > Network (severe)
    wp-admin/typekit-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Settings/configuration page), #2 (Detailed inline help)
You can look at the official readme.txt

typekit-fonts-for-wordpress/typekit.php 85% from 13 tests

The principal PHP file in "Typekit Fonts for WordPress" v. 1.9.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("typekit-fonts-for-wordpress.php" instead of "typekit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin288 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP267118288

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.50
▷ Minimum class complexity10.00
▷ Maximum class complexity19.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.89MB with 0.60MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png599.28KB215.83KB▼ 63.98%
screenshot-1.png312.67KB91.65KB▼ 70.69%