78% aparat

Code Review | Aparat

WordPress plugin Aparat scored 78% from 54 tests.

About plugin

  • Plugin page: aparat
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Oct 26, 2022
  • Number of updates: 26
  • Update frequency: every 104.2 days
  • Top authors: nipoto (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

5,000+ active / 40,348 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.08ms] 75% from 4 tests

Server-side resources used by Aparat
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 664.26ms on /wp-admin/plugin-install.php?s=nipoto&tab=search&type=author)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.87 ▼3.05
Dashboard /wp-admin3.31 ▲0.0145.32 ▼0.52
Posts /wp-admin/edit.php3.36 ▲0.0146.31 ▲0.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.25 ▲13.99
Media Library /wp-admin/upload.php3.24 ▲0.0133.87 ▲2.63
افزونه آپارات /wp-admin/admin.php?page=uxdev3.0122.79
سایر پلاگین‌ها /wp-admin/plugin-install.php?s=nipoto&tab=search&type=author3.35664.26

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: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Aparat: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲4213.28 ▲0.101.78 ▼2.6339.89 ▲2.68
Dashboard /wp-admin2,234 ▲285.79 ▲0.9494.75 ▼8.7548.03 ▲9.87
Posts /wp-admin/edit.php2,120 ▲282.01 ▲0.0239.86 ▲3.0140.60 ▲7.31
Add New Post /wp-admin/post-new.php1,570 ▲3318.61 ▼4.55640.37 ▲3.3748.57 ▼0.31
Media Library /wp-admin/upload.php1,419 ▲314.28 ▲0.0394.26 ▼5.6147.10 ▲4.08
افزونه آپارات /wp-admin/admin.php?page=uxdev280.440.093.50
سایر پلاگین‌ها /wp-admin/plugin-install.php?s=nipoto&tab=search&type=author1,6742.1028.9544.51

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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/aparat/index.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=uxdev
    • > Network (severe)
    wp-admin/admin.php?page=uxdev - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: video, aparat, clip, responsive

aparat/index.php 92% from 13 tests

The entry point to "Aparat" version 1.7.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aparat.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected97 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101271
JavaScript14126

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tinyMCE/aparat.png1.59KB0.86KB▼ 46.02%