10% font-resizer-matching-theme-style

Code Review | Font Resizer

WordPress plugin Font Resizer scored10%from 54 tests.

About plugin

  • Plugin page: font-resizer-matc...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: May 8, 2023
  • Number of updates: 51
  • Update frequency: every 44.8 days
  • Top authors: tawhidurrahmandear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /4,050 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/font-resizer-matching-theme-style/font-resizer.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; tawhidurrahmandeartwentyeightWidget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼57.12ms] Passed 4 tests

Server-side resources used by Font Resizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.19 ▼40.86
Dashboard /wp-admin2.08 ▼1.2212.72 ▼41.34
Posts /wp-admin/edit.php2.08 ▼1.285.91 ▼47.20
Add New Post /wp-admin/post-new.php2.08 ▼3.815.70 ▼99.06
Media Library /wp-admin/upload.php2.08 ▼1.156.67 ▼27.64

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

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

Browser metrics Passed 4 tests

Font Resizer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▲0.121.65 ▲0.0644.83 ▲2.85
Dashboard /wp-admin2,189 ▲95.53 ▼0.0893.98 ▲7.3639.10 ▼0.31
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0435.85 ▼7.0634.12 ▼3.04
Add New Post /wp-admin/post-new.php1,525 ▼123.66 ▲1.88711.28 ▼1.0054.77 ▲2.76
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0492.71 ▼8.8740.06 ▼3.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/font-resizer-matching-theme-style/font-resizer.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; tawhidurrahmandeartwentyeightWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_tawhidurrahmandeartwentyeightwidget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: font, decrease text, increase text, font resizer, font size

font-resizer-matching-theme-style/font-resizer.php 85% from 13 tests

The main file in "Font Resizer" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 244 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("font-resizer-matching-theme-style.php" instead of "font-resizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1191154

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin