83% ts-webfonts-for-iclusta

Code Review | TypeSquare Webfonts for iCLUSTA+

WordPress plugin TypeSquare Webfonts for iCLUSTA+ scored83%from 54 tests.

About plugin

  • Plugin page: ts-webfonts-for-i...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-6.0
  • WordPress version: 6.3.1
  • First release: Oct 22, 2021
  • Latest release: Jul 8, 2022
  • Number of updates: 8
  • Update frequency: every 32.4 days
  • Top authors: tyoshizawagmogshd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /405 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼3.49ms] Passed 4 tests

This is a short check of server-side resources used by TypeSquare Webfonts for iCLUSTA+
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3638.52 ▲1.18
Dashboard /wp-admin3.64 ▲0.3047.98 ▼13.97
Posts /wp-admin/edit.php3.69 ▲0.3452.11 ▲7.30
Add New Post /wp-admin/post-new.php6.16 ▲0.2887.66 ▼4.94
Media Library /wp-admin/upload.php3.50 ▲0.2739.87 ▲3.76

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for TypeSquare Webfonts for iCLUSTA+
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.85 ▲0.4254.00 ▲52.3841.71 ▼0.34
Dashboard /wp-admin2,214 ▲375.64 ▼0.0486.83 ▼4.1039.97 ▲0.85
Posts /wp-admin/edit.php2,122 ▲192.03 ▲0.0341.00 ▲5.5132.84 ▼4.21
Add New Post /wp-admin/post-new.php1,545 ▲323.27 ▲5.08661.77 ▲28.2552.31 ▼19.21
Media Library /wp-admin/upload.php1,419 ▲194.22 ▲0.03106.12 ▲10.4747.18 ▲4.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • 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 shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > 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-iclusta/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-iclusta/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-iclusta/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-iclusta/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-iclusta/inc/class/class.fonttheme.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-webfonts-for-iclusta/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-iclusta/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-iclusta/inc/class/class.fonttheme.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/ts-webfonts-for-iclusta/inc/class/class.fonttheme.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/ts-webfonts-for-iclusta/inc/class/class.fonttheme.php on line 2

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: webfonts, fonts

ts-webfonts-for-iclusta/ts-webfonts-for-iclusta.php 77% from 13 tests

"TypeSquare Webfonts for iCLUSTA+" version 2.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 151 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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,338 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11191611,764
CSS3158201,076
JavaScript18971497
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected