10% favicon-generator

Code Review | Favicon Generator

WordPress plugin Favicon Generator scored 10% from 54 tests.

About plugin

  • Plugin page: favicon-generator
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-2.9.2
  • WordPress version: 6.3.1
  • First release: Feb 23, 2009
  • Latest release: Aug 22, 2012
  • Number of updates: 22
  • Update frequency: every 58.0 days
  • Top authors: brandondove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 39,253 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.37ms] Passed 4 tests

An overview of server-side resources used by Favicon Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.40 ▼39.93
Dashboard /wp-admin2.05 ▼1.265.98 ▼39.85
Posts /wp-admin/edit.php2.05 ▼1.316.47 ▼43.30
Add New Post /wp-admin/post-new.php2.05 ▼3.847.83 ▼82.39
Media Library /wp-admin/upload.php2.05 ▼1.187.74 ▼27.31

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
pj_favicon_generator_options

Browser metrics Passed 4 tests

An overview of browser requirements for Favicon Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.23 ▼1.061.73 ▼0.1339.90 ▼3.16
Dashboard /wp-admin2,224 ▲394.88 ▼0.93110.51 ▲0.2074.87 ▲28.99
Posts /wp-admin/edit.php2,107 ▲182.03 ▼0.0337.61 ▼5.1334.34 ▼4.95
Add New Post /wp-admin/post-new.php1,690 ▲16924.66 ▲1.59689.62 ▲40.1853.31 ▲1.31
Media Library /wp-admin/upload.php1,394 ▲34.13 ▼0.10100.63 ▼0.1875.52 ▲29.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • pj_favicon_generator_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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/favicon-generator/pj-favicon-generator.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === favicon-generator === )
  • Screenshots: Add images for these screenshots: #1 (Favicon Generator configuration screen), #2 (Shows the favicon in place)
You can take inspiration from this readme.txt

favicon-generator/pj-favicon-generator.php 92% from 13 tests

"Favicon Generator" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("favicon-generator.php" instead of "pj-favicon-generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,094 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42332041,068
CSS12026

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity36.50
▷ Minimum class complexity30.00
▷ Maximum class complexity43.00
Average method complexity5.73
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.33MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
menu-icon.png0.61KB0.62KB0.00%
large-menu-icon.png1.31KB1.18KB▼ 9.93%
screenshot-1.png237.48KB54.93KB▼ 76.87%
screenshot-2.png97.11KB36.68KB▼ 62.23%