84% olympus-google-fonts

Code Review | Fonts Plugin | Google Fonts Typography

WordPress plugin Fonts Plugin | Google Fonts Typography scored84%from 54 tests.

About plugin

  • Plugin page: olympus-google-fonts
  • Plugin version: 3.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 16, 2017
  • Latest release: Nov 7, 2023
  • Number of updates: 189
  • Update frequency: every 11.7 days
  • Top authors: DannyCooper (100%)

Code review

54 tests

User reviews

1032 reviews

Install metrics

200,000+ active /6,278,002 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲6.57MB] [CPU: ▲31.56ms] 75% from 4 tests

Server-side resources used by Fonts Plugin | Google Fonts Typography
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 6.57MB on /wp-admin/admin.php?page=fonts-plugin-typekit)
PageMemory (MB)CPU Time (ms)
Home /10.15 ▲6.6872.97 ▲31.70
Dashboard /wp-admin9.94 ▲6.6380.12 ▲25.28
Posts /wp-admin/edit.php10.01 ▲6.6583.13 ▲35.32
Add New Post /wp-admin/post-new.php12.19 ▲6.30132.78 ▲35.87
Media Library /wp-admin/upload.php9.95 ▲6.7270.29 ▲33.92
Fonts Plugin /wp-admin/admin.php?page=fonts-plugin9.9259.02
Adobe Fonts /wp-admin/admin.php?page=fonts-plugin-typekit9.9259.67

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Fonts Plugin | Google Fonts Typography
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16414.19 ▼0.041.67 ▼0.0240.14 ▼5.74
Dashboard /wp-admin2,324 ▲1475.69 ▼0.00100.26 ▼2.3546.20 ▲3.30
Posts /wp-admin/edit.php2,157 ▲572.03 ▲0.0742.76 ▲3.9238.08 ▲3.38
Add New Post /wp-admin/post-new.php6,418 ▲4,89228.24 ▲5.22940.27 ▲266.9841.26 ▼15.75
Media Library /wp-admin/upload.php1,456 ▲564.23 ▲0.0098.95 ▼3.3642.80 ▼1.22
Fonts Plugin /wp-admin/admin.php?page=fonts-plugin8921.6526.6339.14
Adobe Fonts /wp-admin/admin.php?page=fonts-plugin-typekit8401.6726.4625.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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 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
The following issues need your attention
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/olympus-google-fonts/includes/class-ogf-notifications.php:260
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/olympus-google-fonts/class-olympus-google-fonts.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olympus-google-fonts/admin/class-ogf-upload-fonts-screen.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/olympus-google-fonts/compatibility/thewordpressteam.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olympus-google-fonts/includes/class-ogf-clear-cache.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olympus-google-fonts/olympus-google-fonts.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olympus-google-fonts/includes/class-ogf-reset.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/olympus-google-fonts/compatibility/themefreesia.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/olympus-google-fonts/compatibility/woocommerce.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olympus-google-fonts/includes/customizer/settings.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

olympus-google-fonts/olympus-google-fonts.php Passed 13 tests

"Fonts Plugin | Google Fonts Typography" version 3.4.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
100 characters long description:
The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected12,561 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,422
PHP356211,2843,260
JavaScript131661401,055
CSS216520806
XML1101718

PHP code Passed 2 tests

An overview 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.33
Average class complexity9.84
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods121
▷ Static methods86.61%
▷ Public methods11292.56%
▷ Protected methods75.79%
▷ Private methods21.65%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.07MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fontsplugin-icon.png0.61KB0.81KB0.00%
admin/fonts-plugin-quickstart-guide.png69.24KB74.41KB0.00%
assets/images/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/images/chosen-sprite.png0.53KB0.88KB0.00%