10% salut-patrick

Code Review | Salut Patrick

WordPress plugin Salut Patrick scored 10% from 54 tests.

About plugin

  • Plugin page: salut-patrick
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Apr 28, 2020
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: xabacab35 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 353 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/salut-patrick/salut-patrick.php+199
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼55.74ms] Passed 4 tests

An overview of server-side resources used by Salut Patrick
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.46 ▼47.22
Dashboard /wp-admin2.12 ▼1.185.74 ▼41.05
Posts /wp-admin/edit.php2.13 ▼1.247.56 ▼40.76
Add New Post /wp-admin/post-new.php2.12 ▼3.776.68 ▼93.93
Media Library /wp-admin/upload.php2.12 ▼1.117.19 ▼28.77

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_salut_patrick
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Salut Patrick
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.111.68 ▼0.3538.88 ▲0.38
Dashboard /wp-admin2,206 ▲185.88 ▲0.85106.02 ▼5.4741.76 ▼2.56
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0238.95 ▼3.9136.80 ▲0.82
Add New Post /wp-admin/post-new.php1,514 ▼2017.65 ▼5.53595.99 ▼31.8751.75 ▼17.12
Media Library /wp-admin/upload.php1,385 ▲34.15 ▼0.07100.81 ▲2.1042.74 ▼0.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/salut-patrick/salut-patrick.php+199
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_salut_patrick
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/salut-patrick/salut-patrick.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Figure 1 : Exemple d'affichage sur une page d'accueil.), #2 (Figure 2 : Les Paramètres disponible dans l'interface d'administration.), #3 (Figure 3 : L'extension Salut Patrick dans la liste des extensions Wordpress.)
Please take inspiration from this readme.txt

salut-patrick/salut-patrick.php Passed 13 tests

The main PHP script in "Salut Patrick" version 1.0 is automatically included on every request by WordPress
70 characters long description:
Intégrez Salut Patrick sur votre blog Wordpress via ce super Widget !

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 detected131 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13830131

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin