84% disable-remove-google-fonts

Code Review | Disable and Remove Google Fonts

WordPress plugin Disable and Remove Google Fonts scored84%from 54 tests.

About plugin

  • Plugin page: disable-remove-go...
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4
  • WordPress version: 6.3.1
  • First release: Jul 16, 2019
  • Latest release: Nov 7, 2023
  • Number of updates: 54
  • Update frequency: every 29.2 days
  • Top authors: DannyCooper (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

100,000+ active /1,401,636 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.70ms] Passed 4 tests

Server-side resources used by Disable and Remove Google Fonts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0545.87 ▲6.86
Dashboard /wp-admin3.38 ▲0.0746.95 ▼5.41
Posts /wp-admin/edit.php3.49 ▲0.1348.80 ▲2.79
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.55 ▼11.09
Media Library /wp-admin/upload.php3.30 ▲0.0736.20 ▲2.90
Google Fonts /wp-admin/themes.php?page=drgf3.2533.86

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
dismissed-drgf-welcome
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Disable and Remove Google Fonts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5814.24 ▲0.081.54 ▼0.2937.87 ▼6.12
Dashboard /wp-admin2,228 ▲515.67 ▲0.0194.62 ▼6.2242.00 ▼5.47
Posts /wp-admin/edit.php2,131 ▲282.04 ▲0.0939.89 ▼0.1337.08 ▲3.64
Add New Post /wp-admin/post-new.php1,550 ▲2423.39 ▲0.22689.57 ▲9.9559.63 ▲0.47
Media Library /wp-admin/upload.php1,427 ▲244.23 ▲0.0499.73 ▼2.1145.20 ▲3.34
Google Fonts /wp-admin/themes.php?page=drgf8741.6725.5567.10

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • dismissed-drgf-welcome
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/disable-remove-google-fonts/admin/class-drgf-notice.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/disable-remove-google-fonts/admin/class-drgf-admin.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-remove-google-fonts/inc/remove-google-fonts.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: speed, google, disable google fonts, optimize, google fonts...

disable-remove-google-fonts/disable-remove-google-fonts.php Passed 13 tests

The entry point to "Disable and Remove Google Fonts" version 1.5.7 is a PHP file that has certain tags in its header comment area
70 characters long description:
Optimize frontend performance by removing Google Fonts. GDPR-friendly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected403 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP473170307
CSS110059
JavaScript11719
XML1101718

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1381.25%
▷ Anonymous functions318.75%
Constants4
▷ Global constants4100.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
No PNG files were detected