74% simple-google-font-adder

Code Review | Simple Google Font Adder

WordPress plugin Simple Google Font Adder scored74%from 54 tests.

About plugin

  • Plugin page: simple-google-fon...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 27, 2020
  • Latest release: Nov 24, 2020
  • Number of updates: 24
  • Update frequency: every 1.4 days
  • Top authors: rouenwebmaster (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /3,237 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.86MB] [CPU: ▼54.92ms] Passed 4 tests

An overview of server-side resources used by Simple Google Font Adder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.63 ▼37.51
Dashboard /wp-admin2.15 ▼1.157.14 ▼46.00
Posts /wp-admin/edit.php2.15 ▼1.207.02 ▼43.49
Add New Post /wp-admin/post-new.php2.15 ▼3.744.85 ▼92.66
Media Library /wp-admin/upload.php2.15 ▼1.085.55 ▼31.96

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
gfont_url
gfont_name

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Google Font Adder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.35 ▼0.021.99 ▲0.2824.46 ▼19.12
Dashboard /wp-admin2,213 ▲335.49 ▼0.1884.95 ▼3.0348.20 ▲4.68
Posts /wp-admin/edit.php2,124 ▲212.02 ▲0.0134.68 ▼10.9937.74 ▼0.75
Add New Post /wp-admin/post-new.php1,701 ▲16422.06 ▲3.91583.95 ▼36.9453.11 ▼16.88
Media Library /wp-admin/upload.php1,424 ▲274.21 ▲0.0694.59 ▼13.6255.09 ▲9.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the prefix_bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • gfont_name
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • gfont_url

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-google-font-adder/uninstall.php

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 errors were detected

Optimizations

Plugin configuration 96% from 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
3 plugin tags: google font, add google font, add google font editor

simple-google-font-adder/add_gfont.php 92% from 13 tests

The main PHP file in "Simple Google Font Adder" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-google-font-adder.php" instead of "add_gfont.php")

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
Good job! No executable or dangerous file extensions detected284 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23599219
PO File1202065

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin