78% kpoint-video-embedder

Code Review | Plugin Name: kPoint Video Embedder

WordPress plugin Plugin Name: kPoint Video Embedderscored78%from 54 tests.

About plugin

  • Plugin page: kpoint-video-embe...
  • Plugin version: 7.8
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Jun 4, 2015
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: Team Kpoint (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.90ms] Passed 4 tests

Analyzing server-side resources used by Plugin Name: kPoint Video Embedder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.86 ▼2.50
Dashboard /wp-admin3.34 ▲0.0345.99 ▼4.08
Posts /wp-admin/edit.php3.39 ▲0.0347.80 ▲1.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.22 ▼17.31
Media Library /wp-admin/upload.php3.26 ▲0.0332.96 ▼3.69
kPoint Video Embedder /wp-admin/options-general.php?page=kpoint_kapsules_helper3.2024.37

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Plugin Name: kPoint Video Embedder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.32 ▼1.084.21 ▲2.4239.15 ▼1.40
Dashboard /wp-admin2,210 ▲194.83 ▼1.10112.85 ▲13.6141.25 ▲2.66
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0436.50 ▲1.3034.51 ▼1.59
Add New Post /wp-admin/post-new.php1,536 ▼623.44 ▲0.31655.07 ▼28.5962.56 ▲7.26
Media Library /wp-admin/upload.php1,392 ▲14.23 ▲0.0695.99 ▼1.5140.56 ▼2.72
kPoint Video Embedder /wp-admin/options-general.php?page=kpoint_kapsules_helper7892.0326.2226.96

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=kpoint_kapsules_helper
    • > Notice in wp-content/plugins/kpoint-video-embedder/kPointSettings.php+67
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/kpoint-video-embedder/kPointPlugin.php:12

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 88% 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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Plugin Name: kPoint Video Embedder=== )
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

kpoint-video-embedder/kPointPlugin.php 92% from 13 tests

The entry point to "Plugin Name: kPoint Video Embedder" version 7.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kpoint-video-embedder.php" instead of "kPointPlugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin164 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24018139
Markdown113025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity6.00
▷ Minimum method complexity6.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png13.29KB7.48KB▼ 43.72%