84% aparat-shortcode

Code Review | Aparat Video Shortcode

WordPress plugin Aparat Video Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: aparat-shortcode
  • Plugin version: 0.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.6
  • WordPress version: 6.3.1
  • First release: Apr 2, 2012
  • Latest release: Aug 6, 2013
  • Number of updates: 16
  • Update frequency: every 30.7 days
  • Top authors: aliaghdam (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /6,247 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Aparat Video Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.14 ▼1.55
Dashboard /wp-admin3.31 ▼0.0346.23 ▼12.83
Posts /wp-admin/edit.php3.37 ▲0.0144.33 ▲2.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.72 ▼17.29
Media Library /wp-admin/upload.php3.24 ▲0.0134.19 ▼2.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Aparat Video Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.35 ▲0.071.73 ▼0.3639.17 ▼6.22
Dashboard /wp-admin2,195 ▲245.60 ▼0.0784.51 ▼17.1436.51 ▼8.20
Posts /wp-admin/edit.php2,079 ▼212.00 ▼0.0238.60 ▲1.2137.10 ▲3.43
Add New Post /wp-admin/post-new.php1,536 ▼023.36 ▲5.33623.86 ▲3.2974.78 ▼33.46
Media Library /wp-admin/upload.php1,400 ▲64.25 ▲0.0199.10 ▼8.1646.87 ▼3.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/aparat-shortcode/aparat-video-shortcut.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Example off a video shortcode.) image not found
The official readme.txt is a good inspiration

aparat-shortcode/aparat-video-shortcut.php 92% from 13 tests

This is the main PHP file of "Aparat Video Shortcode" version 0.2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aparat-shortcode.php" instead of "aparat-video-shortcut.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin59 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinyMCE/wand.png3.69KB1.03KB▼ 72.18%
screenshot-1.png25.10KB11.40KB▼ 54.58%