93% embed-documents-shortcode

Code Review | Embed documents shortcode

WordPress plugin Embed documents shortcode scored 93% from 54 tests.

About plugin

  • Plugin page: embed-documents-s...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.6
  • WordPress version: 5.8.1
  • First release: Jul 14, 2013
  • Latest release: Dec 25, 2015
  • Number of updates: 13
  • Update frequency: every 105.7 days
  • Top authors: boluda (84.62%)unitepress (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,220 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.22ms] Passed 4 tests

A check of server-side resources used by Embed documents shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.01 ▲14.45
Dashboard /wp-admin3.06 ▲0.0146.79 ▼3.42
Posts /wp-admin/edit.php3.11 ▲0.0146.82 ▼1.40
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.05 ▼566.48
Media Library /wp-admin/upload.php3.01 ▲0.0036.05 ▲2.41

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Embed documents shortcode: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8416.18 ▲0.5910.73 ▲2.9747.27 ▼0.95
Dashboard /wp-admin2,967 ▲335.90 ▼0.04148.79 ▲8.38118.72 ▼0.20
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0168.40 ▼1.5693.08 ▲0.00
Add New Post /wp-admin/post-new.php1,683 ▼018.70 ▼0.09384.25 ▼16.42121.29 ▲6.58
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.01145.79 ▼13.50132.02 ▲4.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/embed-documents-shortcode/embed-documents-shortcode.php:34

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === embed-documents-shortcode === )
The official readme.txt is a good inspiration

embed-documents-shortcode/embed-documents-shortcode.php 85% from 13 tests

The entry point to "Embed documents shortcode" version 1.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14255

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin