77% grad-aparat-rss

Code Review | Aparat Videos RSS Reader | GRAD

WordPress plugin Aparat Videos RSS Reader | GRAD scored77%from 54 tests.

About plugin

  • Plugin page: grad-aparat-rss
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Dec 12, 2018
  • Latest release: Sep 30, 2020
  • Number of updates: 23
  • Update frequency: every 28.6 days
  • Top authors: hossein.g.rad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Aparat Videos RSS Reader | GRAD
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.92 ▼2.04
Dashboard /wp-admin3.31 ▲0.0051.79 ▼0.86
Posts /wp-admin/edit.php3.36 ▲0.0048.12 ▲0.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.74 ▼1.26
Media Library /wp-admin/upload.php3.23 ▲0.0040.39 ▲4.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Aparat Videos RSS Reader | GRAD
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.131.83 ▼0.2943.76 ▼1.64
Dashboard /wp-admin2,209 ▲214.88 ▼0.04101.29 ▼5.0738.45 ▼3.63
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0236.81 ▲1.2833.27 ▼6.31
Add New Post /wp-admin/post-new.php1,514 ▼1917.46 ▼5.78709.90 ▲61.5055.08 ▼4.52
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0598.79 ▼8.4145.16 ▲2.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/grad-aparat-rss/wp-aparat-grad.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/grad-aparat-rss/includes/widgets/class-widget-aparat-general.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Widget_Aparat_General__APARSSGRAD' not found in wp-content/plugins/grad-aparat-rss/includes/widgets/class-widget-aparat-selected-videos-list.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/grad-aparat-rss/includes/shortcodes/shortcode-aparat-video.php:80
    • > PHP Fatal error
      Uncaught Error: Class 'Widget_Aparat_General__APARSSGRAD' not found in wp-content/plugins/grad-aparat-rss/includes/widgets/class-widget-aparat-rss-list.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === grad-aparat-rss === )
Please take inspiration from this readme.txt

grad-aparat-rss/wp-aparat-grad.php 85% from 13 tests

The main PHP file in "Aparat Videos RSS Reader | GRAD" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("grad-aparat-rss.php" instead of "wp-aparat-grad.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected781 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6291239680
PO File14164101

PHP code Passed 2 tests

An overview 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.37
Average class complexity37.75
▷ Minimum class complexity9.00
▷ Maximum class complexity63.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1157.89%
▷ Protected methods842.11%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants4
▷ Global constants4100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/aparat_icon_color_white_32.png1.84KB1.03KB▼ 43.70%
public/images/aparat_icon_color_black_32.png1.85KB1.03KB▼ 44.03%