84% prestashop-saiyandev-widget

Code Review | Prestashop Saiyandev Widget

WordPress plugin Prestashop Saiyandev Widget scored84%from 54 tests.

About plugin

  • Plugin page: prestashop-saiyan...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2013
  • Latest release: Apr 23, 2013
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: jotraverso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,483 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.03ms] Passed 4 tests

Analyzing server-side resources used by Prestashop Saiyandev Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.10 ▼1.88
Dashboard /wp-admin3.35 ▲0.0549.42 ▼0.68
Posts /wp-admin/edit.php3.40 ▲0.0447.83 ▲0.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.52 ▼3.97
Media Library /wp-admin/upload.php3.27 ▲0.0433.49 ▼5.57

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_prestashop_saiyandev_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Prestashop Saiyandev Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.70 ▼0.634.96 ▲3.3140.17 ▼0.32
Dashboard /wp-admin2,206 ▲215.80 ▲0.9397.81 ▼15.7940.31 ▲0.36
Posts /wp-admin/edit.php2,086 ▼61.99 ▼0.0336.04 ▼7.8435.49 ▼0.06
Add New Post /wp-admin/post-new.php1,533 ▲523.35 ▲5.31635.83 ▲35.8154.19 ▲1.61
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0798.23 ▼10.8842.27 ▼7.91

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_prestashop_saiyandev_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/prestashop-saiyandev-widget/saiyandev-prestashop.php:28

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 ([Sample config](http://saiyandev.files.wordpress.com/2013/04/screenshot_1.jpg?w=302))
You can look at the official readme.txt

prestashop-saiyandev-widget/saiyandev-prestashop.php 92% from 13 tests

This is the main PHP file of "Prestashop Saiyandev Widget" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("prestashop-saiyandev-widget.php" instead of "saiyandev-prestashop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin300 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2610218
PHP11713455
CSS11027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin