83% xserver-typesquare-webfonts

Code Review | TypeSquare Webfonts for エックスサーバー

WordPress plugin TypeSquare Webfonts for エックスサーバー scored83%from 54 tests.

About plugin

  • Plugin page: xserver-typesquar...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2017
  • Latest release: Oct 26, 2023
  • Number of updates: 26
  • Update frequency: every 89.7 days
  • Top authors: xserverjp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100,000+ active /885,866 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.30MB] [CPU: ▼4.52ms] Passed 4 tests

A check of server-side resources used by TypeSquare Webfonts for エックスサーバー
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3739.64 ▲0.20
Dashboard /wp-admin3.64 ▲0.3047.69 ▼9.35
Posts /wp-admin/edit.php3.69 ▲0.3446.41 ▲2.08
Add New Post /wp-admin/post-new.php6.16 ▲0.2881.85 ▼10.67
Media Library /wp-admin/upload.php3.50 ▲0.2737.68 ▲1.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for TypeSquare Webfonts for エックスサーバー
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲17314.80 ▲0.6052.94 ▲51.2438.36 ▼2.89
Dashboard /wp-admin2,220 ▲405.60 ▼0.0582.58 ▼6.9740.21 ▲1.28
Posts /wp-admin/edit.php2,122 ▲221.97 ▼0.0433.33 ▼3.9133.49 ▼4.59
Add New Post /wp-admin/post-new.php1,545 ▲1723.65 ▲0.52666.69 ▲14.0753.43 ▲1.17
Media Library /wp-admin/upload.php1,425 ▲284.16 ▼0.13101.74 ▲0.5045.25 ▲0.86

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TypeSquare_Admin_Base' not found in wp-content/plugins/xserver-typesquare-webfonts/inc/admin-root.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TypeSquare_Admin_Base' not found in wp-content/plugins/xserver-typesquare-webfonts/inc/admin-fonttheme.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.api.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/xserver-typesquare-webfonts/inc/class/class.fonttheme.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: webfonts, fonts

xserver-typesquare-webfonts/ts-webfonts-for-xserver.php 69% from 13 tests

The main file in "TypeSquare Webfonts for エックスサーバー" v. 2.0.5 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:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("xserver-typesquare-webfonts.php" instead of "ts-webfonts-for-xserver.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,364 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11191611,787
CSS3158201,079
JavaScript18971497
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.09
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods95
▷ Static methods1616.84%
▷ Public methods6871.58%
▷ Protected methods00.00%
▷ Private methods2728.42%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.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