84% custom-google-fonts

Code Review | Custom Google Fonts

WordPress plugin Custom Google Fonts scored84%from 54 tests.

About plugin

  • Plugin page: custom-google-fonts
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6
  • WordPress version: 6.3.1
  • First release: Aug 29, 2016
  • Latest release: Mar 3, 2017
  • Number of updates: 7
  • Update frequency: every 26.4 days
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.46ms] Passed 4 tests

A check of server-side resources used by Custom Google Fonts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.92 ▼2.08
Dashboard /wp-admin3.35 ▲0.0044.17 ▼15.13
Posts /wp-admin/edit.php3.40 ▲0.0447.66 ▲0.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.02 ▼1.59
Media Library /wp-admin/upload.php3.27 ▲0.0435.66 ▲3.67

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Custom Google Fonts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7114.45 ▲0.001.95 ▲0.0841.35 ▼1.80
Dashboard /wp-admin2,220 ▲355.85 ▼0.0397.34 ▼6.5181.00 ▲35.10
Posts /wp-admin/edit.php2,106 ▲201.97 ▼0.0638.77 ▲0.4735.26 ▲1.81
Add New Post /wp-admin/post-new.php1,537 ▲1823.55 ▲0.48670.50 ▼19.4252.19 ▲2.92
Media Library /wp-admin/upload.php1,402 ▲114.26 ▲0.1395.40 ▼2.6163.67 ▲20.70

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-google-fonts/custom-google-fonts.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Admin Panel view of submitted form data.) image missing
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The entry point to "Custom Google Fonts" version 1.0.2 is a PHP file that has certain tags in its header comment area
37 characters long description:
Simple WordPress Google Fonts Plugin.

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 plugin267 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17610149
CSS112069
PO File1151849

PHP code Passed 2 tests

This is a short overview 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.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png11.25KB4.39KB▼ 60.99%
screenshot-1.png31.05KB14.41KB▼ 53.61%
images/icon.png1.57KB1.40KB▼ 10.82%