84% zvi-callback-widget

Code Review | ZVI CallBack widget

WordPress plugin ZVI CallBack widget scored84%from 54 tests.

About plugin

  • Plugin page: zvi-callback-widget
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2019
  • Latest release: Oct 14, 2019
  • Number of updates: 10
  • Update frequency: every 20.2 days
  • Top authors: zava75 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,041 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 gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.41ms] Passed 4 tests

This is a short check of server-side resources used by ZVI CallBack widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.21 ▲4.59
Dashboard /wp-admin3.41 ▲0.1054.54 ▲3.62
Posts /wp-admin/edit.php3.52 ▲0.1652.06 ▲1.69
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.17 ▼4.49
Media Library /wp-admin/upload.php3.33 ▲0.1036.33 ▲0.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 71 new files
Database: no new tables, 18 new options
New WordPress options
zvi_callback_email
zvi_callback_subtitle
zvi_callback_title
zvi_callback_color_hover
theysaidso_admin_options
zvi_callback_left
zvi_callback_telegram_send
widget_recent-posts
zvi_callback_telegram_token
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by ZVI CallBack widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,006 ▲24513.80 ▼0.4110.74 ▲8.9165.54 ▲17.86
Dashboard /wp-admin2,221 ▲445.59 ▼0.1091.35 ▼4.0536.81 ▼3.80
Posts /wp-admin/edit.php2,126 ▲262.03 ▲0.0041.55 ▲0.9835.14 ▼4.74
Add New Post /wp-admin/post-new.php1,544 ▲1623.34 ▲0.45636.13 ▼3.5453.30 ▼2.23
Media Library /wp-admin/upload.php1,423 ▲234.26 ▲0.09104.91 ▼3.7047.54 ▲3.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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 50% 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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/zvi-callback-widget/zvi-callback-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/zvi-callback-widget/uninstall.php:12

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 93% from 29 tests

readme.txt 88% 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 to be fixed:
  • Screenshots: Screenshot #2 (Configuration here) image required
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

zvi-callback-widget/zvi-callback-widget.php Passed 13 tests

"ZVI CallBack widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
107 characters long description:
ZVI CallBack widget WordPress. Customize CallBack widget WordPress (+ Support Contact Form 7 +Bot Telegram)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected4,258 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PO File191,0071,0262,978
JavaScript21017748
PHP34226453
CSS215079

PHP code Passed 2 tests

This is a short overview 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.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
22 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/14.png1.08KB1.13KB0.00%
img/telegram.png1.83KB1.59KB▼ 12.83%
img/10.png1.36KB1.43KB0.00%
img/facebook.png1.36KB1.28KB▼ 5.67%
img/8.png1.15KB1.20KB0.00%