10% control-v

Code Review | Control V

WordPress plugin Control V scored10%from 54 tests.

About plugin

  • Plugin page: control-v
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Aug 11, 2014
  • Number of updates: 14
  • Update frequency: every 0.3 days
  • Top authors: Liren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /911 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.13ms] Passed 4 tests

Server-side resources used by Control V
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.85 ▲0.57
Dashboard /wp-admin3.38 ▲0.0751.49 ▼5.77
Posts /wp-admin/edit.php3.43 ▲0.0757.76 ▲6.77
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.82 ▼3.90
Media Library /wp-admin/upload.php3.30 ▲0.0741.58 ▲4.59
Add Template /wp-admin/post-new.php?post_type=ctrlv_templates3.4456.50
Categories /wp-admin/edit-tags.php?taxonomy=ctrlv_templates_cat&post_type=ctrlv_templates3.3240.12
Documentation /wp-admin/edit.php?post_type=ctrlv_templates&page=ctrlv-documentation3.2935.98
Templates /wp-admin/edit.php?post_type=ctrlv_templates3.4044.98

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Control V
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.54 ▼0.101.67 ▼0.0844.21 ▼1.55
Dashboard /wp-admin2,217 ▲405.56 ▼0.0287.00 ▼15.4980.01 ▲35.58
Posts /wp-admin/edit.php2,241 ▲1412.00 ▼0.0441.28 ▲2.5937.37 ▲2.31
Add New Post /wp-admin/post-new.php1,656 ▲12823.60 ▲0.29763.83 ▲72.9661.35 ▲9.47
Media Library /wp-admin/upload.php1,437 ▲374.20 ▼0.0394.41 ▼8.8169.02 ▲26.54
Add Template /wp-admin/post-new.php?post_type=ctrlv_templates2,3877.73173.5299.69
Categories /wp-admin/edit-tags.php?taxonomy=ctrlv_templates_cat&post_type=ctrlv_templates1,4122.2927.0133.94
Documentation /wp-admin/edit.php?post_type=ctrlv_templates&page=ctrlv-documentation9752.0125.7327.66
Templates /wp-admin/edit.php?post_type=ctrlv_templates1,7821.9835.6631.99

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/control-v/inc/shortcodes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/control-v/inc/cpt.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/control-v/inc/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/control-v/inc/documentation.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/control-v/inc/cpt.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/control-v/inc/helper-window.php:15

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

control-v/liren-ctrlv.php 85% from 13 tests

"Control V" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("control-v.php" instead of "liren-ctrlv.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
Success! There were no dangerous files found in this plugin525 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6152108330
CSS1283138
PO File191136
JavaScript1231821

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/liren-logo.png4.14KB2.27KB▼ 45.24%
imgs/custom-post-icon.png0.45KB0.51KB0.00%