71% rocket-font

Code Review | Rocket Font

WordPress plugin Rocket Font scored71%from 54 tests.

About plugin

  • Plugin page: rocket-font
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2015
  • Latest release: Jul 29, 2020
  • Number of updates: 66
  • Update frequency: every 29.7 days
  • Top authors: Qwerty_23 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /24,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.55ms] Passed 4 tests

An overview of server-side resources used by Rocket Font
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.87 ▲0.11
Dashboard /wp-admin3.32 ▲0.0248.23 ▼1.58
Posts /wp-admin/edit.php3.43 ▲0.0846.02 ▼1.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.45 ▼17.29
Media Library /wp-admin/upload.php3.24 ▲0.0133.35 ▼2.26
로켓 폰트 /wp-admin/options-general.php?page=rocket-font-setting3.2030.73

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Rocket Font
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.26 ▼1.141.70 ▼0.2043.03 ▼3.37
Dashboard /wp-admin2,256 ▲675.04 ▲0.08107.81 ▼17.5147.15 ▲4.52
Posts /wp-admin/edit.php2,142 ▲532.33 ▲0.3348.34 ▲9.1642.42 ▲10.20
Add New Post /wp-admin/post-new.php1,543 ▲2423.07 ▼0.42679.63 ▲0.3960.40 ▲7.16
Media Library /wp-admin/upload.php1,435 ▲504.33 ▲0.12105.65 ▲2.6748.49 ▲3.27
로켓 폰트 /wp-admin/options-general.php?page=rocket-font-setting2,8443.89140.98173.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • rocket_font
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rocket-font-setting
    • > Notice in wp-content/plugins/rocket-font/features/admin/setting.php+126
    Undefined index:
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rocket-font-setting
    • > Notice in wp-content/plugins/rocket-font/assets/templates/admin/setting.php+53
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rocket-font/assets/templates/admin/setting.php
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: font_family_list in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 89
    • > PHP Notice
      Undefined variable: plugin_url in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rocket_font\\plugin_dir_path() in wp-content/plugins/rocket-font/rocket-font.php:15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 53
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 53
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/rocket-font/assets/templates/admin/tinymce-rocketfont-dynamic-css.php on line 3
    • > PHP Notice
      Undefined variable: font_list in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 27
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 53
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 186
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/rocket-font/assets/templates/admin/setting.php on line 89

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: A description for screenshot #3 is missing in rocket-font/assets to your readme.txt
Please take inspiration from this readme.txt

rocket-font/rocket-font.php 69% from 13 tests

The principal PHP file in "Rocket Font" v. 1.2.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 207 characters long)
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin2,157 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP11203129911
JavaScript7160166692
CSS1145102554

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods53
▷ Static methods2037.74%
▷ Public methods5298.11%
▷ Protected methods00.00%
▷ Private methods11.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/js/tag-editor/delete.png0.24KB0.22KB▼ 9.20%