90% remove-open-sans-font-from-wp-core

Code Review | Remove Google Fonts

WordPress plugin Remove Google Fonts scored90%from 54 tests.

About plugin

  • Plugin page: remove-open-sans-...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.3
  • WordPress version: 6.3.1
  • First release: Feb 13, 2014
  • Latest release: Apr 4, 2017
  • Number of updates: 31
  • Update frequency: every 37.0 days
  • Top authors: suifengtec (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /49,345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.85ms] Passed 4 tests

Server-side resources used by Remove Google Fonts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.02 ▲3.67
Dashboard /wp-admin3.31 ▲0.0147.12 ▼6.06
Posts /wp-admin/edit.php3.36 ▲0.0051.35 ▲2.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.60 ▼17.60
Media Library /wp-admin/upload.php3.23 ▲0.0039.12 ▲1.78

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Remove Google Fonts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.071.73 ▼0.4441.51 ▼2.20
Dashboard /wp-admin2,206 ▲154.88 ▼0.03100.19 ▼7.1840.94 ▼4.79
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0439.78 ▲2.1133.67 ▼2.64
Add New Post /wp-admin/post-new.php1,533 ▲1323.16 ▼0.08615.24 ▲17.3954.34 ▼2.76
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.10102.85 ▲2.3247.86 ▲3.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: google fonts, inconsolata font, noto sans, open sans, noto serif

remove-open-sans-font-from-wp-core/no-open-sans-font.php 92% from 13 tests

The primary PHP file in "Remove Google Fonts" version 1.2.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("remove-open-sans-font-from-wp-core.php" instead of "no-open-sans-font.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin46 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2293246

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.57
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods6
▷ Static methods350.00%
▷ Public methods6100.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 were not PNG files found in your plugin