83% embed-videogjirafa

Code Review | EmbedVideoGjirafa

WordPress plugin EmbedVideoGjirafa scored83%from 54 tests.

About plugin

  • Plugin page: embed-videogjirafa
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 15, 2019
  • Latest release: Jun 17, 2022
  • Number of updates: 29
  • Update frequency: every 38.6 days
  • Top authors: pajtim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.08ms] Passed 4 tests

This is a short check of server-side resources used by EmbedVideoGjirafa
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.22 ▲5.15
Dashboard /wp-admin3.32 ▲0.0248.86 ▼11.25
Posts /wp-admin/edit.php3.37 ▲0.0253.41 ▼2.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.78 ▼6.61
Media Library /wp-admin/upload.php3.24 ▲0.0236.72 ▲3.68

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for EmbedVideoGjirafa
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.34 ▼1.265.13 ▲2.9542.38 ▼0.52
Dashboard /wp-admin2,224 ▲184.87 ▼0.98111.29 ▲7.7041.42 ▲2.11
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0039.64 ▼7.0135.37 ▼1.31
Add New Post /wp-admin/post-new.php1,534 ▲323.24 ▼0.10669.04 ▼3.2054.14 ▼2.97
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.0297.06 ▼4.1342.45 ▲1.19

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/embed-videogjirafa/index.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires php: Version not formatted correctly
The official readme.txt might help

embed-videogjirafa/index.php 77% from 13 tests

The entry point to "EmbedVideoGjirafa" version 1.0.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "6.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("embed-videogjirafa.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
Success! There were no dangerous files found in this plugin84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP171556
JavaScript11028

PHP code Passed 2 tests

This is a very shot 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.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin