84% wp-which-fonts

Code Review | WP Which Fonts?

WordPress plugin WP Which Fonts? scored84%from 54 tests.

About plugin

  • Plugin page: wp-which-fonts
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 11, 2018
  • Latest release: Mar 24, 2021
  • Number of updates: 4
  • Update frequency: every 233.3 days
  • Top authors: andrija (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /671 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 gracefully, with no errors

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

A check of server-side resources used by WP Which Fonts?
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.98 ▼5.72
Dashboard /wp-admin3.31 ▲0.0049.77 ▼7.44
Posts /wp-admin/edit.php3.36 ▲0.0050.41 ▼0.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.14 ▼14.66
Media Library /wp-admin/upload.php3.23 ▲0.0036.86 ▼0.02

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Which Fonts?
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.45 ▼0.9418.25 ▲16.3841.50 ▼6.02
Dashboard /wp-admin2,189 ▲125.58 ▼0.1586.89 ▼15.0637.68 ▼8.80
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0036.79 ▼3.8235.50 ▼0.78
Add New Post /wp-admin/post-new.php1,540 ▲918.23 ▼4.82609.92 ▼12.3558.57 ▲9.64
Media Library /wp-admin/upload.php1,397 ▼64.31 ▲0.12103.23 ▲1.9348.01 ▼0.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-which-fonts/wp-which-fonts.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: styles, fonts

wp-which-fonts/wp-which-fonts.php Passed 13 tests

The main PHP script in "WP Which Fonts?" version 1.0.1 is automatically included on every request by WordPress
77 characters long description:
Outputs a list of fonts used on any front end page in the javascript console.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin85 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1246977
PHP14118

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin