84% aparat-embed

Code Review | Aparat Embed

WordPress plugin Aparat Embed scored84%from 54 tests.

About plugin

  • Plugin page: aparat-embed
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Jan 8, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.56ms] Passed 4 tests

A check of server-side resources used by Aparat Embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.43 ▼4.42
Dashboard /wp-admin3.33 ▲0.0251.24 ▼5.51
Posts /wp-admin/edit.php3.38 ▲0.0247.37 ▼3.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.87 ▼17.16
Media Library /wp-admin/upload.php3.25 ▲0.0239.61 ▲4.66

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Aparat Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.03 ▼0.351.69 ▼0.4543.85 ▲1.60
Dashboard /wp-admin2,192 ▲155.57 ▼0.0894.39 ▼3.4541.71 ▼2.20
Posts /wp-admin/edit.php2,097 ▼02.09 ▲0.0835.78 ▼1.2434.87 ▼1.50
Add New Post /wp-admin/post-new.php1,526 ▼223.65 ▲0.62688.73 ▲59.6953.54 ▼13.65
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.00111.90 ▲11.8745.39 ▲0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aparat-embed/init.php:110

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: aparat, embed, video, oembed

aparat-embed/init.php 92% from 13 tests

The main PHP script in "Aparat Embed" version 0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("aparat-embed.php" instead of "init.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
No dangerous file extensions were detected100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP119883
CSS10017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG files were detected