84% simple-google-fonts-japanese

Code Review | Simple Google Fonts Japanese

WordPress plugin Simple Google Fonts Japanese scored84%from 54 tests.

About plugin

  • Plugin page: simple-google-fon...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Dec 3, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: yossybunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.46ms] Passed 4 tests

This is a short check of server-side resources used by Simple Google Fonts Japanese
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.29 ▼0.04
Dashboard /wp-admin3.32 ▲0.0247.69 ▼2.13
Posts /wp-admin/edit.php3.37 ▲0.0143.25 ▼5.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.25 ▼13.90
Media Library /wp-admin/upload.php3.24 ▲0.0137.28 ▲1.91
Simple Google Fonts Japanese /wp-admin/options-general.php?page=simple-google-fonts-japanese3.2131.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Google Fonts Japanese
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲1514.16 ▼0.191.91 ▼0.0648.21 ▲0.65
Dashboard /wp-admin2,198 ▲215.55 ▼0.1282.46 ▼11.1736.17 ▼11.26
Posts /wp-admin/edit.php2,106 ▲31.97 ▲0.0335.65 ▼0.5032.04 ▼1.12
Add New Post /wp-admin/post-new.php1,537 ▲923.42 ▲0.41605.90 ▼0.0673.02 ▲12.37
Media Library /wp-admin/upload.php1,403 ▲94.19 ▲0.0398.63 ▼0.4146.76 ▲3.27
Simple Google Fonts Japanese /wp-admin/options-general.php?page=simple-google-fonts-japanese1,0871.6932.3140.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-fonts-japanese/sgfj-admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-fonts-japanese/sgfj-generate.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-fonts-japanese/simple-google-fonts-japanese.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
Please take inspiration from this readme.txt

simple-google-fonts-japanese/simple-google-fonts-japanese.php Passed 13 tests

"Simple Google Fonts Japanese" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
99 characters long description:
Change the site font to Japanese Google font. You can change the font type and weight as an option.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected346 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34310219
CSS220127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions11
▷ Named functions11100.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
No PNG images were found in this plugin