83% viideacom-embed

Code Review | viidea-embed

WordPress plugin viidea-embed scored83%from 54 tests.

About plugin

  • Plugin page: viideacom-embed
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2013
  • Latest release: Jul 1, 2013
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: viidea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 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.01MB] [CPU: ▼10.54ms] Passed 4 tests

This is a short check of server-side resources used by viidea-embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.73 ▼0.77
Dashboard /wp-admin3.31 ▼0.0450.84 ▼15.07
Posts /wp-admin/edit.php3.36 ▲0.0050.01 ▼5.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.67 ▼17.49
Media Library /wp-admin/upload.php3.23 ▲0.0034.79 ▼4.32

Server storage [IO: ▲0.63MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by viidea-embed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.161.70 ▼0.0443.97 ▲5.57
Dashboard /wp-admin2,195 ▲215.57 ▼0.0687.28 ▼14.3538.84 ▼8.63
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0433.63 ▼9.1634.67 ▲1.76
Add New Post /wp-admin/post-new.php1,526 ▼923.02 ▲4.58679.22 ▼5.9665.30 ▲0.27
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.1099.53 ▼13.6145.16 ▼2.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.31MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viideacom-embed/viidea-embed.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Embed options inside editor)
You can look at the official readme.txt

viideacom-embed/viidea-embed.php 92% from 13 tests

"viidea-embed" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("viideacom-embed.php" instead of "viidea-embed.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
Good job! No executable or dangerous file extensions detected303 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2131193
HTML15059
PHP1131451

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.61MB with 0.23MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png628.60KB223.15KB▼ 64.50%
img/viidea.png0.67KB0.61KB▼ 8.91%