90% viitor-shortcodes

Code Review | Viitor Button Shortcodes

WordPress plugin Viitor Button Shortcodes scored90%from 54 tests.

About plugin

  • Plugin page: viitor-shortcodes
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: Apr 5, 2023
  • Number of updates: 42
  • Update frequency: every 47.6 days
  • Top authors: mitalideva (83.33%)viitorcloudvc (19.05%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /783 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
Install script ran successfully

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

An overview of server-side resources used by Viitor Button Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.59 ▼1.82
Dashboard /wp-admin3.34 ▲0.0445.65 ▼4.11
Posts /wp-admin/edit.php3.45 ▲0.1048.30 ▲4.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.03 ▲4.81
Media Library /wp-admin/upload.php3.26 ▲0.0334.71 ▲3.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Viitor Button Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.69 ▼0.691.68 ▲0.1037.40 ▼0.66
Dashboard /wp-admin2,206 ▲174.85 ▼0.09108.52 ▼1.6039.79 ▼7.36
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.30 ▲3.0737.65 ▲0.45
Add New Post /wp-admin/post-new.php1,662 ▲14823.29 ▲5.73647.01 ▼21.6354.41 ▲6.31
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0499.15 ▼0.8142.38 ▼0.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
10 plugin tags: page, download button, box, info button, shortcode...

viitor-shortcodes/ww-wp-shortcodes.php 92% from 13 tests

The primary PHP file in "Viitor Button Shortcodes" version 1.0.0 is used by WordPress to initiate all plugin functionality
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 ("viitor-shortcodes.php" instead of "ww-wp-shortcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin424 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP683206188
CSS2719154
JavaScript224782

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity2.67
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
7 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/box-info.png2.23KB1.53KB▼ 31.07%
includes/images/box-download.png3.46KB2.19KB▼ 36.89%
includes/js/images/ww-vcsc.png0.30KB0.21KB▼ 28.99%
includes/js/images/ww-vcsc-single.png1.11KB0.50KB▼ 54.97%
includes/images/box-error.png2.34KB1.81KB▼ 22.70%