62% rh-devnia-webfonts

Code Review | RH Devnia Webfonts

WordPress plugin RH Devnia Webfonts scored62%from 54 tests.

About plugin

  • Plugin page: rh-devnia-webfonts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 20, 2015
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: waheeds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,979 total downloads

Benchmarks

Plugin footprint 65% 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.95MB] [CPU: ▼33.97ms] Passed 4 tests

A check of server-side resources used by RH Devnia Webfonts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.79 ▲6.81
Dashboard /wp-admin2.99 ▼0.3123.79 ▼27.34
Posts /wp-admin/edit.php2.99 ▼0.3627.40 ▼25.96
Add New Post /wp-admin/post-new.php2.99 ▼2.8927.57 ▼68.94
Media Library /wp-admin/upload.php2.99 ▼0.2322.11 ▼13.62
RH Devnia webfonts /wp-admin/options-general.php?page=change_font3.0026.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

RH Devnia Webfonts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲16013.38 ▼0.852.13 ▼0.4635.08 ▼14.32
Dashboard /wp-admin2,325 ▲1345.00 ▼0.89114.95 ▲11.9442.04 ▼1.85
Posts /wp-admin/edit.php2,204 ▲1122.15 ▲0.1538.85 ▼1.5237.28 ▲3.07
Add New Post /wp-admin/post-new.php6,299 ▲4,76323.57 ▲0.25936.41 ▲310.6835.60 ▼18.85
Media Library /wp-admin/upload.php1,506 ▲1244.40 ▲0.1599.55 ▲0.4642.18 ▼3.09
RH Devnia webfonts /wp-admin/options-general.php?page=change_font9761.9725.6436.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=change_font
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=change_font
    • > Notice in wp-content/plugins/rh-devnia-webfonts/change_font.php+2
    Undefined index: devnia_hidden

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rh-devnia-webfonts/change_font.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rh-devnia-webfonts/index.php:22
    • > PHP Notice
      Undefined index: devnia_hidden in wp-content/plugins/rh-devnia-webfonts/change_font.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=change_font
    • > Network (severe)
    http://fonts.hosni.netdna-cdn.com/fonts/cdn/file_font/?font= - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

rh-devnia-webfonts/index.php 92% from 13 tests

"RH Devnia Webfonts" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("rh-devnia-webfonts.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin41,958 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
SVG80028,555
CSS5233610,033
JSON1002,592
JavaScript48432470
PO File29588221
PHP2201587

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
4 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png40.81KB18.66KB▼ 54.27%
assets/screenshot-1.png34.25KB13.79KB▼ 59.75%
assets/icon-128x128.png13.95KB5.80KB▼ 58.42%
screesshot-1.png34.25KB13.79KB▼ 59.75%