Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
- This plugin did not install gracefully
- > Warning in wp-content/plugins/fonts-master/font-class.php+625
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Server metrics [RAM: ▼1.50MB] [CPU: ▼52.83ms] Passed 4 tests
This is a short check of server-side resources used by ShuFont
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.48 ▼0.98 | 6.01 ▼36.61 |
Dashboard /wp-admin | 2.51 ▼0.80 | 7.99 ▼43.51 |
Posts /wp-admin/edit.php | 2.51 ▼0.85 | 7.40 ▼41.54 |
Add New Post /wp-admin/post-new.php | 2.51 ▼3.38 | 6.70 ▼89.65 |
Media Library /wp-admin/upload.php | 2.51 ▼0.72 | 7.23 ▼28.94 |
ShuFont /wp-admin/options-general.php?page=fm-fonts | 2.51 | 7.02 |
Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_theysaidso_widget |
oasf-fonts_id_count |
db_upgraded |
oafm-google-fonts-data |
can_compress_scripts |
widget_recent-comments |
oafm_settings |
theysaidso_admin_options |
oasf-fonts_options |
widget_recent-posts |
Browser metrics Passed 4 tests
ShuFont: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,817 ▲71 | 13.53 ▼1.06 | 1.72 ▼0.13 | 40.14 ▼3.23 |
Dashboard /wp-admin | 2,217 ▲29 | 5.86 ▲0.94 | 115.00 ▲4.93 | 48.88 ▲8.00 |
Posts /wp-admin/edit.php | 2,106 ▲20 | 2.04 ▲0.03 | 40.05 ▲5.14 | 35.61 ▲1.21 |
Add New Post /wp-admin/post-new.php | 1,527 ▲13 | 17.64 ▲0.07 | 668.44 ▲42.29 | 55.37 ▼12.39 |
Media Library /wp-admin/upload.php | 1,405 ▲17 | 4.24 ▲0.03 | 97.82 ▼10.10 | 49.03 ▲6.35 |
ShuFont /wp-admin/options-general.php?page=fm-fonts | 1,072 | 1.84 | 25.59 | 31.02 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Warning in wp-content/plugins/fonts-master/font-class.php+625
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=fm-fonts
- > Warning in wp-content/plugins/fonts-master/font-class.php+629
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
- > GET request to /wp-admin/options-general.php?page=fm-fonts
- > Notice in wp-content/plugins/fonts-master/tinymce/tinymce.php+26
Undefined variable: data
- > GET request to /wp-admin/options-general.php?page=fm-fonts
- > Warning in wp-content/plugins/fonts-master/font-class.php+1875
count(): Parameter must be an array or an object that implements Countable
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 8× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/fonts-master/font-class.php on line 625
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fonts-master/font-class-admin-tables.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/fonts-master/font-class-admin-tables.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fonts-master/shufont.php:27
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fonts-master/font-class.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fonts-master/functions.php:5
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/fonts-master/font-class.php on line 629
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/fonts-master/font-class-admin-tables.php on line 3
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
- Screenshots: These screenshots do not have images: #1 (This is the font's settings page in the admin area. Here is where you upload your fonts and assing them to elements.), #2 (This is the page where you manage your fonts. You can edit them or delete them.)
fonts-master/shufont.php 85% from 13 tests
The primary PHP file in "ShuFont" version 1.6.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("fonts-master.php" instead of "shufont.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,199 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 546 | 333 | 2,099 |
JavaScript | 2 | 166 | 67 | 637 |
CSS | 2 | 70 | 13 | 311 |
PO File | 1 | 69 | 2 | 152 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 38.10 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 232.00 |
Average method complexity | 5.58 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 104.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 81 | |
▷ Static methods | 2 | 2.47% |
▷ Public methods | 80 | 98.77% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.23% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin