68% wp-wvip

Code Review | WordPress WVIP

WordPress plugin WordPress WVIP scored68%from 54 tests.

About plugin

  • Plugin page: wp-wvip
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2016
  • Latest release: Jul 4, 2016
  • Number of updates: 22
  • Update frequency: every 4.5 days
  • Top authors: wbolt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,419 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.45ms] Passed 4 tests

This is a short check of server-side resources used by WordPress WVIP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1444.30 ▲6.41
Dashboard /wp-admin3.45 ▲0.1150.92 ▼20.43
Posts /wp-admin/edit.php3.57 ▲0.2152.58 ▲2.94
Add New Post /wp-admin/post-new.php6.03 ▲0.1589.13 ▼10.73
Media Library /wp-admin/upload.php3.40 ▲0.1743.48 ▲9.96
购买统计 /wp-admin/admin.php?page=wvip_wpstats3.3735.02
会员日志 /wp-admin/admin.php?page=wvip_buylog3.3750.75
WVIP设置 /wp-admin/admin.php?page=wvip_pack3.3731.18
VIP会员 /wp-admin/admin.php?page=wvip_users3.3732.26
非VIP会员 /wp-admin/admin.php?page=wvip_wpusers3.3737.63

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: 2 new tables, 6 new options
New tables
wp_wvip_buylogs
wp_wvip_users
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress WVIP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.22 ▼1.201.69 ▼0.0743.20 ▼0.25
Dashboard /wp-admin2,255 ▲735.85 ▼0.03101.36 ▼6.0248.27 ▲6.60
Posts /wp-admin/edit.php2,144 ▲552.02 ▲0.0339.16 ▲1.0644.96 ▲11.14
Add New Post /wp-admin/post-new.php1,574 ▲5523.11 ▼0.07678.13 ▼23.1059.48 ▲9.26
Media Library /wp-admin/upload.php1,440 ▲524.20 ▼0.0197.33 ▼16.3151.75 ▲4.49
购买统计 /wp-admin/admin.php?page=wvip_wpstats8542.0228.9760.13
会员日志 /wp-admin/admin.php?page=wvip_buylog1,2262.0225.4377.85
WVIP设置 /wp-admin/admin.php?page=wvip_pack9482.1525.0864.05
VIP会员 /wp-admin/admin.php?page=wvip_users9802.0327.2450.13
非VIP会员 /wp-admin/admin.php?page=wvip_wpusers1,0182.0323.6655.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wvip_users
    • wp_wvip_buylogs
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-wvip/views/stats.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-wvip/views/users.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-wvip/views/setting.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-wvip/views/wpusers.php:4
    • > PHP Notice
      Undefined variable: current_url in wp-content/plugins/wp-wvip/views/users.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-wvip/views/buylog.php:4
    • > PHP Notice
      Undefined variable: current_url in wp-content/plugins/wp-wvip/views/wpusers.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-wvip/classes/admin.class.php:15
    • > PHP Notice
      Undefined variable: current_url in wp-content/plugins/wp-wvip/views/buylog.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: vip

wp-wvip/index.php 92% from 13 tests

This is the main PHP file of "WordPress WVIP" version 0.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-wvip.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin1,076 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10256731,075
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.75
▷ Minimum class complexity3.00
▷ Maximum class complexity58.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin