84% victorious-theme-toolkit

Code Review | Victorious Toolkit

WordPress plugin Victorious Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: victorious-theme-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.2.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Jul 30, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kopatheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.80ms] Passed 4 tests

This is a short check of server-side resources used by Victorious Toolkit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0538.07 ▼7.72
Dashboard /wp-admin3.38 ▲0.0148.20 ▼16.83
Posts /wp-admin/edit.php3.43 ▲0.0548.18 ▲2.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0594.71 ▲0.49
Media Library /wp-admin/upload.php3.31 ▲0.0436.81 ▲0.87

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Victorious Toolkit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.48 ▲0.101.98 ▼1.3139.07 ▲0.59
Dashboard /wp-admin2,203 ▲125.83 ▲0.7295.58 ▼9.9238.62 ▼3.88
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0039.15 ▲2.8636.34 ▲4.04
Add New Post /wp-admin/post-new.php1,537 ▲1818.19 ▼4.89628.08 ▼33.3856.56 ▲4.33
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0294.97 ▼1.0742.36 ▲0.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
  • 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/victorious-theme-toolkit/includes/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/victorious-theme-toolkit/includes/widgets/victor-text.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/victorious-theme-toolkit/includes/fields/widget/link-icon.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/victorious-theme-toolkit/includes/post-types/testimonials.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/victorious-theme-toolkit/includes/post-types/portfolio.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/victorious-theme-toolkit/includes/shortcodes/accordions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/victorious-theme-toolkit/includes/shortcodes/tabs.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/victorious-theme-toolkit/includes/widgets/victor-contact-info.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/victorious-theme-toolkit/victorious-toolkit.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/victorious-theme-toolkit/includes/widgets/victor-entry-list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: custom-field, short-code, tool, languages, toolkit

victorious-theme-toolkit/victorious-toolkit.php 92% from 13 tests

The main file in "Victorious Toolkit" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("victorious-theme-toolkit.php" instead of "victorious-toolkit.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
There were no executable files found in this plugin9,823 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
CSS103221333,669
PHP40328363,654
JavaScript4180341,865
PO File1308815635

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.73
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods81
▷ Static methods1923.46%
▷ Public methods81100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
16 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/css/jquery-ui/images/ui-bg_flat_65_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
assets/css/jquery-ui/images/ui-bg_flat_70_dadada_40x100.png0.22KB0.08KB▼ 62.17%
assets/css/jquery-ui/images/ui-bg_flat_0_ccc_40x100.png0.21KB0.08KB▼ 60.45%