10% millvi-wp

Code Review | millvi WP

WordPress plugin millvi WP scored 10% from 54 tests.

About plugin

  • Plugin page: millvi-wp
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 18, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 46
  • Update frequency: every 12.6 days
  • Top authors: eviry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 926 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/millvi-wp/index.php+66
    Use of undefined constant MillviPluginController - assumed 'MillviPluginController' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.95MB] [CPU: ▼52.17ms] Passed 4 tests

Server-side resources used by millvi WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.32 ▼33.70
Dashboard /wp-admin2.06 ▼1.257.82 ▼40.24
Posts /wp-admin/edit.php2.06 ▼1.296.76 ▼38.19
Add New Post /wp-admin/post-new.php2.06 ▼3.836.21 ▼96.55
Media Library /wp-admin/upload.php2.06 ▼1.178.76 ▼27.82

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

millvi WP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.66 ▼0.731.75 ▼0.1036.74 ▼1.14
Dashboard /wp-admin2,265 ▲765.14 ▲0.23105.98 ▼15.7536.27 ▼4.92
Posts /wp-admin/edit.php2,152 ▲632.43 ▲0.4135.25 ▼5.3935.26 ▼1.10
Add New Post /wp-admin/post-new.php1,546 ▲1223.58 ▲0.27677.73 ▲44.2237.24 ▼13.94
Media Library /wp-admin/upload.php1,450 ▲594.55 ▲0.38103.41 ▲6.8444.26 ▲3.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/millvi-wp/index.php+66
    Use of undefined constant MillviPluginController - assumed 'MillviPluginController' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/millvi-wp/config.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/millvi-wp/config.php:10
    • > PHP Warning
      Use of undefined constant MILLVI_RIGHT_PUBLIC - assumed 'MILLVI_RIGHT_PUBLIC' (this will throw an Error in a future version of PHP) in wp-content/plugins/millvi-wp/urls.php on line 13

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Video Uploading), #2 (Player Setting), #3 (Viewing Report)
Please take inspiration from this readme.txt

millvi-wp/index.php 85% from 13 tests

"millvi WP" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 192 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("millvi-wp.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected7,210 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript57303543,539
PHP136036081,798
HTML1048651,108
CSS39120610
PO File12022122
YAML111032
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity41.70
▷ Minimum class complexity1.00
▷ Maximum class complexity215.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods99
▷ Static methods4343.43%
▷ Public methods5858.59%
▷ Protected methods00.00%
▷ Private methods4141.41%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants34
▷ Global constants34100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.59MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png688.37KB303.58KB▼ 55.90%
assets/img/eye.png1.32KB1.27KB▼ 3.84%
assets/img/sort_desc.png0.17KB0.17KB0.00%
assets/img/sort_asc.png0.16KB0.17KB0.00%
assets/img/dashicon_millvi16.png1.15KB0.34KB▼ 70.64%