10% advanced-font-changer

Code Review | Advanced Font Changer

WordPress plugin Advanced Font Changer scored10%from 54 tests.

About plugin

  • Plugin page: advanced-font-cha...
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Nov 15, 2015
  • Number of updates: 29
  • Update frequency: every 5.7 days
  • Top authors: f.n174 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /14,275 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/advanced-font-changer/inc/classes/class_afcfonts.php+174
    Uncaught Error: Call to undefined function mysql_real_escape_string() in wp-content/plugins/advanced-font-changer/inc/classes/class_afcfonts.php:174
    Stack trace:
    #0 wp-content/plugins/advanced-font-changer/inc/classes/class_afcfonts.php(21): afcfonts->updateFonts()
    #1 wp-content/plugins/advanced-font-changer/inc/classes/class_defaults.php(81): afcfonts->addFonts()
    #2 wp-content/plugins/advanced-font-changer/inc/classes/class_defaults.php(62): afcdefaults->add_default_fonts()
    #3 wp-content/plugins/advanced-font-changer/inc/classes/class_defaults.php(17): afcdefaults->createTables()
    #4 wp-content/plugins/advanced-font-changer/advanced-font-changer.php(91): afcdefaults->run()
    #5 wp-includes/class-wp-hook.php(310): pg_afc_install()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action(

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.02ms] Passed 4 tests

Analyzing server-side resources used by Advanced Font Changer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.79 ▼2.94
Dashboard /wp-admin3.31 ▲0.0051.05 ▼1.23
Posts /wp-admin/edit.php3.36 ▲0.0046.62 ▲0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.21 ▼16.25
Media Library /wp-admin/upload.php3.23 ▲0.0037.27 ▲0.34

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 56 new files
Database: 1 new table, 8 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Font Changer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.102.03 ▲0.3244.16 ▲0.32
Dashboard /wp-admin2,198 ▲245.67 ▲0.0091.94 ▲2.5442.79 ▼2.90
Posts /wp-admin/edit.php2,103 ▲32.06 ▲0.0539.78 ▲1.5935.22 ▼1.42
Add New Post /wp-admin/post-new.php1,545 ▲1322.97 ▼0.39680.76 ▲57.7052.24 ▼6.69
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.01101.54 ▼4.0245.33 ▲0.89

Uninstaller [IO: ▲2.33MB] [DB: ▲0.07MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_afc_fonts
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • afc_general_settings
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • afc_db_vertion
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/addexternalfont.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/import-export.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/addselector.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'AFC_WP_List_Table' not found in wp-content/plugins/advanced-font-changer/inc/classes/class_fontslist.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/editselector.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'AFC_WP_List_Table' not found in wp-content/plugins/advanced-font-changer/inc/classes/class_selectorslist.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/uploadfonts.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'afctables' not found in wp-content/plugins/advanced-font-changer/inc/classes/class_defaults.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/general.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-font-changer/inc/admin/editfont.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Donate link: Please fix this invalid url: "wp-src.ir/afc"
You can look at the official readme.txt

advanced-font-changer/advanced-font-changer.php Passed 13 tests

Analyzing the main PHP file in "Advanced Font Changer" version 1.5.5
111 characters long description:
This plugin lets you visually change the font and other text properties in your theme, using its visual editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin16,324 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PO File24054871,054

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity42.90
▷ Minimum class complexity2.00
▷ Maximum class complexity145.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
▷ Static methods10.85%
▷ Public methods118100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions93100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin