10% opes-favicon

Code Review | Opes Favicon

WordPress plugin Opes Favicon scored 10% from 54 tests.

About plugin

  • Plugin page: opes-favicon
  • Plugin version: 3.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: Apr 19, 2015
  • Number of updates: 31
  • Update frequency: every 3.4 days
  • Top authors: twapaw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,772 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/opes-favicon/inc/php-ico/class-php-ico.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; PHP_ICO has a deprecated constructor

Server metrics [RAM: ▼1.77MB] [CPU: ▼49.96ms] Passed 4 tests

Analyzing server-side resources used by Opes Favicon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.28 ▲2.76
Dashboard /wp-admin2.17 ▼1.137.95 ▼41.13
Posts /wp-admin/edit.php2.17 ▼1.197.70 ▼44.96
Add New Post /wp-admin/post-new.php2.17 ▼3.727.54 ▼89.33
Media Library /wp-admin/upload.php2.17 ▼1.067.46 ▼24.40
Opes Favicon /wp-admin/themes.php?page=opes_favicon_options2.328.39

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

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

Browser metrics Passed 4 tests

Opes Favicon: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.19 ▼1.181.95 ▲0.2041.62 ▼0.27
Dashboard /wp-admin2,218 ▲335.81 ▲0.7494.72 ▼19.8038.98 ▼6.81
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0136.50 ▼8.6834.77 ▼1.43
Add New Post /wp-admin/post-new.php1,528 ▲1417.70 ▲0.10657.18 ▼30.5856.90 ▼3.99
Media Library /wp-admin/upload.php1,403 ▲154.25 ▲0.08106.60 ▼5.7347.24 ▲0.43
Opes Favicon /wp-admin/themes.php?page=opes_favicon_options1,1182.0039.6651.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/opes-favicon/inc/php-ico/class-php-ico.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; PHP_ICO has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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
    • > GET request to /wp-admin/themes.php?page=opes_favicon_options
    • > Deprecated in wp-content/plugins/opes-favicon/inc/php-ico/class-php-ico.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; PHP_ICO has a deprecated constructor

SRP 50% 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
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required '__OFWP_jvet__THIS_PLUGIN__DIR_inc/common/common.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/opes-favicon/inc/main.class.php on line 3
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/opes-favicon/inc/admin/controller/3-menuPages-ToLoad.php on line 522
    • > PHP Warning
      Use of undefined constant __OFWP_jvet__THIS_PLUGIN__DIR_ - assumed '__OFWP_jvet__THIS_PLUGIN__DIR_' (this will throw an Error in a future version of PHP) in wp-content/plugins/opes-favicon/inc/main.class.php on line 3
    • > PHP Warning
      require_once(__OFWP_jvet__THIS_PLUGIN__DIR_inc/common/common.class.php): failed to open stream: No such file or directory in wp-content/plugins/opes-favicon/inc/main.class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opes-favicon/inc/admin/controller/3-menuPages-ToLoad.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/opes-favicon/inc/common/controller/2-addFaviconsAndIcons-ToLoad.php:8
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/opes-favicon/inc/common/controller/2-addFaviconsAndIcons-ToLoad.php on line 98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/opes-favicon/opes-favicon.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/opes-favicon/inc/admin/controller/1-activationHook-ToLoad.php:8

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 96% from 29 tests

readme.txt Passed 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
10 plugin tags: windows 8, ios, favicon, x-icon, device...

opes-favicon/opes-favicon.php 92% from 13 tests

The main PHP file in "Opes Favicon" ver. 3.1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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
No dangerous file extensions were detected1,605 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP113185481,525
Markdown134052
CSS11014
JavaScript131114

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity27.30
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity6.26
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods50
▷ Static methods1530.00%
▷ Public methods3774.00%
▷ Protected methods00.00%
▷ Private methods1326.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1894.74%
▷ Class constants15.26%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin