66% admin-branding-and-tweaks

Code Review | Admin Branding and Tweaks

WordPress plugin Admin Branding and Tweaks scored 66% 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: 5.9.2
  • 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

1,000+ active / 11,700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼294.86ms] Passed 4 tests

Analyzing server-side resources used by Admin Branding and Tweaks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1258.77 ▲4.18
Dashboard /wp-admin3.50 ▲0.0935.18 ▲1.90
Posts /wp-admin/edit.php3.72 ▲0.0839.91 ▲1.22
Add New Post /wp-admin/post-new.php7.04 ▲0.0797.84 ▼1,182.59
Media Library /wp-admin/upload.php3.45 ▲0.1525.49 ▲0.04
WP Branding /wp-admin/options-general.php?page=agnet_branding4.5830.98

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, 1 new option
New WordPress options
agnet_branding

Browser metrics Passed 4 tests

A check of browser resources used by Admin Branding and Tweaks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,772 ▲1816.20 ▲0.525.52 ▼1.222.20 ▼0.65
Dashboard /wp-admin2,904 ▲466.10 ▼0.06118.23 ▼18.25139.27 ▼24.98
Posts /wp-admin/edit.php2,703 ▲93.24 ▲0.0163.55 ▼0.26123.32 ▼24.23
Add New Post /wp-admin/post-new.php1,683 ▼3616.79 ▼5.55404.89 ▼44.57156.88 ▼2.09
Media Library /wp-admin/upload.php1,713 ▲155.53 ▲0.12141.39 ▼18.68168.94 ▼51.90
WP Branding /wp-admin/options-general.php?page=agnet_branding7,0249.69172.09179.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • agnet_branding

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
Please fix the following server-side errors
  • 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+5316
    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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings 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: Class 'VP_View' not found in wp-content/plugins/admin-branding-and-tweaks/includes/views/control/date.php:1
    • > PHP Warning
      Use of undefined constant VP_NAMESPACE - assumed 'VP_NAMESPACE' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-branding-and-tweaks/framework/autoload.php on line 12
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/admin-branding-and-tweaks/includes/views/control/radioimage.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/admin-branding-and-tweaks/includes/views/control/checkimage.php: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 168
    • > 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 83
    • > 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/includes/config/dependencies.php on line 192
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/admin-branding-and-tweaks/includes/classes/control/field/select.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/admin-branding-and-tweaks/framework/views/control/fontawesome.php:1
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/admin-branding-and-tweaks/framework/views/control/template_control_head.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=agnet_branding
    • > Network (severe)
    css/googlefont.css?ver=5.9.2 - 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=5.9.2 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 important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 32 tag instead of maximum 10
You can look at the official readme.txt

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

"Admin Branding and Tweaks" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to 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 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected17,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

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity 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

All PNG images should be compressed to minimize bandwidth usage for end users
46 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/public/img/bootstrap-colorpicker/saturation.png8.61KB5.13KB▼ 40.41%
framework/public/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
framework/public/img/vp-logo.png1.94KB0.66KB▼ 65.94%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%