83% google-typography

Code Review | Google Typography

WordPress plugin Google Typography scored83%from 54 tests.

About plugin

  • Plugin page: google-typography
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: Jun 15, 2013
  • Latest release: Jan 9, 2019
  • Number of updates: 8
  • Update frequency: every 254.6 days
  • Top authors: ericalli (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

5,000+ active /248,943 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▼4.72ms] Passed 4 tests

Analyzing server-side resources used by Google Typography
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.20 ▲2.70
Dashboard /wp-admin3.33 ▲0.0348.31 ▲0.11
Posts /wp-admin/edit.php3.38 ▲0.0348.92 ▼2.47
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.92 ▼15.26
Media Library /wp-admin/upload.php3.25 ▲0.0232.56 ▼1.27
Typography /wp-admin/themes.php?page=typography5.3739.45

Server storage [IO: ▲1.36MB] [DB: ▲0.21MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Google Typography
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12813.48 ▼0.901.93 ▲0.3640.73 ▼8.24
Dashboard /wp-admin2,244 ▲595.26 ▲0.37113.86 ▲8.3739.15 ▼6.26
Posts /wp-admin/edit.php2,131 ▲392.45 ▲0.4043.05 ▲2.3034.79 ▼1.71
Add New Post /wp-admin/post-new.php1,549 ▲2923.56 ▲0.07782.93 ▲108.4444.88 ▼15.15
Media Library /wp-admin/upload.php1,429 ▲444.55 ▲0.33101.11 ▼3.9443.17 ▼1.36
Typography /wp-admin/themes.php?page=typography7,8662.4747.4146.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/google-typography/google-typography.php:40

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 93% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Easily customize any fonts on your website with Google Typography.), #2 (Choose from over 600+ fonts, with new fonts added daily.), #3 (Amazing typography, all without writing a single line of code.)
The official readme.txt might help

google-typography/google-typography.php 92% from 13 tests

The primary PHP file in "Google Typography" version 1.1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 157 characters long)

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
Good job! No executable or dangerous file extensions detected1,311 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS21020640
PHP1129165334
JavaScript26116200
PO File15050114
Markdown110023

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
14 PNG files occupy 1.25MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
images/step_2@2x.png66.21KB29.62KB▼ 55.26%
images/step_1@2x.png68.56KB24.19KB▼ 64.72%
banner-772x250.png122.42KB66.86KB▼ 45.38%
images/step_3@2x.png47.82KB18.38KB▼ 61.55%