90% swap-google-font-display

Code Review | Swap Google Fonts Display

WordPress plugin Swap Google Fonts Display scored90%from 54 tests.

About plugin

  • Plugin page: swap-google-font-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: May 14, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 43
  • Update frequency: every 36.0 days
  • Top authors: gijo (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

10,000+ active /115,271 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.72ms] Passed 4 tests

Analyzing server-side resources used by Swap Google Fonts Display
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.09 ▼5.42
Dashboard /wp-admin3.38 ▲0.0842.27 ▼11.22
Posts /wp-admin/edit.php3.41 ▲0.0643.38 ▼1.77
Add New Post /wp-admin/post-new.php6.05 ▲0.1771.36 ▼19.56
Media Library /wp-admin/upload.php3.32 ▲0.0928.99 ▼6.67

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Swap Google Fonts Display: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.281.67 ▲0.0940.54 ▼3.43
Dashboard /wp-admin2,195 ▲155.59 ▼0.0881.02 ▼7.2938.66 ▼1.06
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.1034.27 ▼3.4331.77 ▲2.56
Add New Post /wp-admin/post-new.php1,529 ▼923.34 ▲0.22618.53 ▼36.2453.43 ▼0.39
Media Library /wp-admin/upload.php1,397 ▼64.23 ▼0.0095.67 ▼1.0841.16 ▼1.68

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: web font, google fonts, fonts, display swap

swap-google-font-display/swap-google-font-display.php Passed 13 tests

The main PHP file in "Swap Google Fonts Display" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Ensure text remains visible during webfont load

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121836

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin