84% ts-webfonts-for-conoha

Code Review | TypeSquare Webfonts for ConoHa

WordPress plugin TypeSquare Webfonts for ConoHa scored 84% from 54 tests.

About plugin

  • Plugin page: ts-webfonts-for-c...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 26, 2018
  • Latest release: Mar 22, 2023
  • Number of updates: 13
  • Update frequency: every 126.4 days
  • Top authors: conoha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active / 138,623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.60ms] Passed 4 tests

An overview of server-side resources used by TypeSquare Webfonts for ConoHa
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.24 ▼3.35
Dashboard /wp-admin3.33 ▲0.0344.36 ▼0.79
Posts /wp-admin/edit.php3.44 ▲0.0946.18 ▼3.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.55 ▲0.98
Media Library /wp-admin/upload.php3.25 ▲0.0238.28 ▲5.99

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for TypeSquare Webfonts for ConoHa
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲20914.68 ▲0.4546.28 ▲44.3839.06 ▼1.24
Dashboard /wp-admin2,228 ▲464.83 ▼1.07110.48 ▲11.7142.37 ▼0.73
Posts /wp-admin/edit.php2,111 ▲222.04 ▲0.0440.16 ▼1.1736.48 ▲0.06
Add New Post /wp-admin/post-new.php1,542 ▲2318.40 ▼4.87621.23 ▼64.1257.40 ▼6.68
Media Library /wp-admin/upload.php1,410 ▲224.22 ▲0.0693.69 ▼15.8039.95 ▼5.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • 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
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× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/ts-webfonts-for-conoha/inc/class/class.api.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/ts-webfonts-for-conoha/inc/class/class.api.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TypeSquare_Admin_Base' not found in wp-content/plugins/ts-webfonts-for-conoha/inc/admin-root.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-webfonts-for-conoha/inc/admin-dashboard.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/ts-webfonts-for-conoha/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/ts-webfonts-for-conoha/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/ts-webfonts-for-conoha/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/ts-webfonts-for-conoha/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/ts-webfonts-for-conoha/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/ts-webfonts-for-conoha/inc/class/class.fonttheme.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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: fonts, webfonts

ts-webfonts-for-conoha/ts-webfonts-for-conoha.php 85% from 13 tests

The entry point to "TypeSquare Webfonts for ConoHa" version 2.0.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected3,884 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP11189611,717
CSS3158201,076
JavaScript29871551
JSX23813467
JSON20073

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity30.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin