84% virtue-toolkit

Code Review | Virtue/Ascend/Pinnacle Toolkit

WordPress plugin Virtue/Ascend/Pinnacle Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: virtue-toolkit
  • Plugin version: 4.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: Nov 23, 2022
  • Number of updates: 87
  • Update frequency: every 37.1 days
  • Top authors: britner (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

50,000+ active /1,550,841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.04MB] [CPU: ▲2.17ms] Passed 4 tests

Server-side resources used by Virtue/Ascend/Pinnacle Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.51 ▲1.0547.44 ▲3.15
Dashboard /wp-admin4.33 ▲1.0248.56 ▲0.30
Posts /wp-admin/edit.php4.41 ▲1.0556.93 ▲9.95
Add New Post /wp-admin/post-new.php7.05 ▲1.1688.35 ▼1.09
Media Library /wp-admin/upload.php4.25 ▲1.0245.07 ▲6.31
Add New /wp-admin/post-new.php?post_type=portfolio7.0487.63
Portfolio Type /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio4.2442.92
All Portfolio /wp-admin/edit.php?post_type=portfolio4.3244.09

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Virtue/Ascend/Pinnacle Toolkit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10114.47 ▲0.201.72 ▲0.0242.58 ▼0.20
Dashboard /wp-admin2,239 ▲514.91 ▲0.01111.80 ▲7.4842.54 ▲1.40
Posts /wp-admin/edit.php2,290 ▲2043.47 ▲1.4796.96 ▲57.3330.95 ▼2.72
Add New Post /wp-admin/post-new.php1,553 ▲2018.54 ▼4.75639.51 ▼43.9034.77 ▼24.21
Media Library /wp-admin/upload.php1,418 ▲334.15 ▼0.0781.37 ▼26.1341.23 ▼6.71
Add New /wp-admin/post-new.php?post_type=portfolio6,30323.60887.8633.08
Portfolio Type /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio1,2952.1427.5026.77
All Portfolio /wp-admin/edit.php?post_type=portfolio1,2933.4243.1528.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • kadence_toolkit_flushpermalinks
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please take a closer look at the following
  • 61× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/virtue-toolkit/cmb/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/virtue-toolkit/cmb/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/virtue-toolkit/cmb/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/virtue-toolkit/cmb/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/virtue-toolkit/cmb/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/virtue-toolkit/cmb/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/virtue-toolkit/shortcodes/youtube/youtube_popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/virtue-toolkit/author_box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/virtue-toolkit/shortcodes/columns/columns_popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/virtue-toolkit/shortcodes.php:352

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please add at least on tag
You can take inspiration from this readme.txt

virtue-toolkit/virtue_toolkit.php 92% from 13 tests

The principal PHP file in "Virtue/Ascend/Pinnacle Toolkit" v. 4.9.8 is loaded by WordPress automatically on each request
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 ("virtue-toolkit.php" instead of "virtue_toolkit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected58,477 lines of code in 256 files:
LanguageFilesBlank linesComment linesLines of code
PO File12620,24532,71736,890
PHP792,4526,36511,989
CSS152741,1915,200
JavaScript196018072,987
Sass17306291,411

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity19.17
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes77
▷ Abstract classes911.69%
▷ Concrete classes6888.31%
▷ Final classes00.00%
Methods592
▷ Static methods10517.74%
▷ Public methods49583.61%
▷ Protected methods8915.03%
▷ Private methods81.35%
Functions87
▷ Named functions87100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ 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
26 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/portfolio-icon.png1.07KB0.28KB▼ 74.20%
assets/select2.png0.60KB0.99KB0.00%
cmb/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
cmb/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
shortcodes/vimeo/img/vimeo.png1.56KB0.95KB▼ 39.17%