90% disable-google-fonts

Code Review | Disable Google Fonts

WordPress plugin Disable Google Fonts scored90%from 54 tests.

About plugin

  • Plugin page: disable-google-fonts
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2013
  • Latest release: Feb 24, 2019
  • Number of updates: 20
  • Update frequency: every 95.5 days
  • Top authors: dimadin (100%)

Code review

54 tests

User reviews

42 reviews

Install metrics

50,000+ active /872,651 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Disable Google Fonts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.45 ▲2.06
Dashboard /wp-admin3.35 ▼0.0047.76 ▼12.45
Posts /wp-admin/edit.php3.40 ▲0.0445.49 ▼2.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.87 ▼10.33
Media Library /wp-admin/upload.php3.27 ▲0.0435.36 ▲1.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Google Fonts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▼0.171.69 ▲0.1745.26 ▲8.90
Dashboard /wp-admin2,198 ▲185.65 ▲0.0584.70 ▼3.8637.23 ▼3.97
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0135.00 ▼3.1034.31 ▲0.05
Add New Post /wp-admin/post-new.php1,526 ▼023.32 ▼0.17670.34 ▲13.4551.62 ▼1.15
Media Library /wp-admin/upload.php1,394 ▼04.20 ▲0.0296.45 ▼0.4643.08 ▼0.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: open sans, google web fonts, google fonts

disable-google-fonts/disable-google-fonts.php 92% from 13 tests

The entry point to "Disable Google Fonts" version 2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP133211180

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin