56% admin-branding-and-tweaks

Code Review | Admin Branding and Tweaks

WordPress plugin Admin Branding and Tweaks scored56%from 54 tests.

About plugin

  • Plugin page: admin-branding-an...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Aug 31, 2015
  • Number of updates: 39
  • Update frequency: every 2.3 days
  • Top authors: nivijah (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

800+ active /12,052 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.47MB] [CPU: ▼39.32ms] Passed 4 tests

This is a short check of server-side resources used by Admin Branding and Tweaks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0421.07 ▼20.97
Dashboard /wp-admin3.54 ▲0.2420.54 ▼30.31
Posts /wp-admin/edit.php3.54 ▲0.1918.84 ▼30.28
Add New Post /wp-admin/post-new.php3.54 ▼2.3419.78 ▼75.71
Media Library /wp-admin/upload.php3.54 ▲0.3219.54 ▼15.14
WP Branding /wp-admin/options-general.php?page=agnet_branding3.5419.80

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 398 new files
Database: no new tables, 7 new options
New WordPress options
agnet_branding
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Admin Branding and Tweaks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.73 ▲0.351.71 ▼0.0244.75 ▼0.17
Dashboard /wp-admin2,218 ▲274.85 ▼0.01112.15 ▼5.2741.02 ▼4.29
Posts /wp-admin/edit.php2,101 ▲122.06 ▲0.0634.89 ▼1.1131.64 ▼5.47
Add New Post /wp-admin/post-new.php1,549 ▲1623.34 ▲0.18677.88 ▼22.8061.55 ▲3.27
Media Library /wp-admin/upload.php1,403 ▲214.18 ▼0.0295.42 ▼1.9838.61 ▼8.62
WP Branding /wp-admin/options-general.php?page=agnet_branding6,0097.41141.93122.97

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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/admin-branding-and-tweaks/framework/includes/wpalchemy/MetaBox.php+61
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • agnet_branding
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=agnet_branding
    • > Deprecated in wp-content/plugins/admin-branding-and-tweaks/framework/includes/wpalchemy/MetaBox.php+61
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=agnet_branding
    • > User deprecated in wp-includes/functions.php+5453
    Function wp_richedit_pre is deprecated since version 4.3.0! Use format_for_editor() instead.
    • > GET request to /wp-admin/options-general.php?page=agnet_branding
    • > Deprecated in wp-content/plugins/admin-branding-and-tweaks/framework/bootstrap.php+195
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/admin-branding-and-tweaks/index.php
  • 228× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/admin-branding-and-tweaks/framework/constant.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/admin-branding-and-tweaks/framework/classes/control/field/html.php:3
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-branding-and-tweaks/framework/config/dependencies.php on line 164
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/admin-branding-and-tweaks/includes/views/control/checkimage.php on line 1
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/admin-branding-and-tweaks/includes/views/control/html.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/admin-branding-and-tweaks/framework/classes/control/field/textbox.php:3
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/admin-branding-and-tweaks/includes/views/control/fontawesome.php on line 1
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-branding-and-tweaks/framework/config/dependencies.php on line 135
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMultiImage' not found in wp-content/plugins/admin-branding-and-tweaks/framework/classes/control/field/radioimage.php:3
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/admin-branding-and-tweaks/framework/views/control/select.php on line 1

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=agnet_branding
    • > Network (severe)
    css/googlefont.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=agnet_branding
    • > Javascript (severe) in unknown
    /wp-content/plugins/admin-branding-and-tweaks/framework/public/js/vendor/jquery.tipsy.js?ver=1.0.0a 179:24 Uncaught TypeError: this[binder] is not a function
    • > GET request to /wp-admin/options-general.php?page=agnet_branding
    • > Javascript (severe) in unknown
    /wp-content/plugins/admin-branding-and-tweaks/framework/public/js/option.min.js?ver=6.3.1 0:373 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (32 tag instead of maximum 10)
You can take inspiration from this readme.txt

admin-branding-and-tweaks/wp_branding.php 92% from 13 tests

"Admin Branding and Tweaks" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("admin-branding-and-tweaks.php" instead of "wp_branding.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin17,562 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP932,1082,3399,319
CSS181581763,348
JavaScript484543032,983
Sass164301,377
SVG100414
Markdown3480120
JSON1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.38
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes112
▷ Abstract classes87.14%
▷ Concrete classes10492.86%
▷ Final classes00.00%
Methods1,010
▷ Static methods17817.62%
▷ Public methods94493.47%
▷ Protected methods383.76%
▷ Private methods282.77%
Functions76
▷ Named functions76100.00%
▷ Anonymous functions00.00%
Constants72
▷ Global constants6691.67%
▷ Class constants68.33%
▷ Public constants6100.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
46 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/public/img/vp_shortcode_icon_sprite.png1.55KB0.42KB▼ 73.10%
framework/public/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
includes/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/public/img/vp-logo.png1.94KB0.66KB▼ 65.94%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%