84% embed-can-i-use

Code Review | Embed Can I Use

WordPress plugin Embed Can I Use scored84%from 54 tests.

About plugin

  • Plugin page: embed-can-i-use
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Mar 24, 2019
  • Number of updates: 5
  • Update frequency: every 206.8 days
  • Top authors: CreativeJuiz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Embed Can I Use
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.89 ▼6.09
Dashboard /wp-admin3.32 ▲0.0151.53 ▼5.96
Posts /wp-admin/edit.php3.37 ▲0.0151.92 ▼4.97
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.01 ▲2.07
Media Library /wp-admin/upload.php3.25 ▲0.0137.21 ▲0.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Embed Can I Use: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▲0.051.72 ▼0.2044.40 ▲0.50
Dashboard /wp-admin2,198 ▲215.58 ▲0.0084.50 ▼20.7538.74 ▼8.97
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0141.76 ▲3.8836.04 ▼4.73
Add New Post /wp-admin/post-new.php1,526 ▼223.35 ▲0.25644.65 ▼41.4257.00 ▲3.51
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.0598.64 ▼15.3844.71 ▼4.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-can-i-use/embed-can-i-use.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (An example of an Embedded Can I Use table) image missing
Please take inspiration from this readme.txt

embed-can-i-use/embed-can-i-use.php Passed 13 tests

"Embed Can I Use" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
Add Can I Use support tables to your WordPress web site thanks to this shortcode. [ ciu_embed ]

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin80 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File210424750
PHP1223630

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.59KB12.45KB▼ 42.33%