84% very-basic-google-fonts

Code Review | Very Basic Google Fonts

WordPress plugin Very Basic Google Fonts scored84%from 54 tests.

About plugin

  • Plugin page: very-basic-google...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 6, 2018
  • Latest release: Apr 6, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: bananabread (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Very Basic Google Fonts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.35 ▼5.80
Dashboard /wp-admin3.32 ▼0.0356.80 ▼10.70
Posts /wp-admin/edit.php3.37 ▲0.0148.75 ▼10.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.23 ▼6.33
Media Library /wp-admin/upload.php3.24 ▲0.0137.64 ▼1.46
Google Fonts /wp-admin/options-general.php?page=google_fonts3.2134.28

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Very Basic Google Fonts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.16 ▼0.111.83 ▼0.1035.72 ▼8.57
Dashboard /wp-admin2,196 ▲165.74 ▲0.1288.35 ▼3.3238.63 ▲0.51
Posts /wp-admin/edit.php2,104 ▲11.97 ▼0.0238.40 ▼3.9733.85 ▼4.96
Add New Post /wp-admin/post-new.php1,540 ▲1418.15 ▼4.91631.51 ▼8.6963.14 ▲7.68
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.0997.37 ▼4.7642.98 ▲0.32
Google Fonts /wp-admin/options-general.php?page=google_fonts8101.9926.8929.48

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please fix the following items
  • 1× 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/very-basic-google-fonts/googlefonts.php:15

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: simple, fonts, basic, very, google

very-basic-google-fonts/googlefonts.php 92% from 13 tests

The main file in "Very Basic Google Fonts" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("very-basic-google-fonts.php" instead of "googlefonts.php")

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
Everything looks great! No dangerous files found in this plugin52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17852

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions4
▷ Named functions4100.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
PNG images were not found in this plugin