79% sg-autorepondeur-comment

Code Review | SG Autorepondeur Comment

WordPress plugin SG Autorepondeur Comment scored79%from 54 tests.

About plugin

  • Plugin page: sg-autorepondeur-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2019
  • Latest release: Jul 29, 2019
  • Number of updates: 7
  • Update frequency: every 6.7 days
  • Top authors: lotfim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.07ms] Passed 4 tests

A check of server-side resources used by SG Autorepondeur Comment
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.70 ▼2.26
Dashboard /wp-admin3.40 ▲0.1049.99 ▲1.76
Posts /wp-admin/edit.php3.52 ▲0.1648.85 ▲1.82
Add New Post /wp-admin/post-new.php6.00 ▲0.11103.92 ▲9.65
Media Library /wp-admin/upload.php3.33 ▲0.0937.55 ▼1.59
Sg-Autorepondeur Comment /wp-admin/options-general.php?page=sgarc_settings3.3135.38

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for SG Autorepondeur Comment
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.80 ▼0.578.94 ▲7.2544.73 ▼0.85
Dashboard /wp-admin2,206 ▲265.58 ▼0.0886.27 ▼8.9145.24 ▼1.17
Posts /wp-admin/edit.php2,105 ▲52.01 ▼0.0238.43 ▼0.8238.88 ▲0.10
Add New Post /wp-admin/post-new.php1,533 ▲723.07 ▼0.26587.30 ▼91.7262.07 ▲4.25
Media Library /wp-admin/upload.php1,408 ▲84.31 ▲0.19101.08 ▼19.6546.72 ▼0.99
Sg-Autorepondeur Comment /wp-admin/options-general.php?page=sgarc_settings8562.0325.4426.48

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/sg-autorepondeur-comment/public/partials/sg-autorepondeur-comment-public-display.php
    • > /wp-content/plugins/sg-autorepondeur-comment/includes/class-sg-autorepondeur-comment.php
    • > /wp-content/plugins/sg-autorepondeur-comment/includes/class-sg-autorepondeur-comment-i18n.php
    • > /wp-content/plugins/sg-autorepondeur-comment/includes/class-sg-autorepondeur-comment-activator.php
    • > /wp-content/plugins/sg-autorepondeur-comment/models/API_SG.php
    • > /wp-content/plugins/sg-autorepondeur-comment/admin/partials/sg-autorepondeur-comment-admin-display.php
    • > /wp-content/plugins/sg-autorepondeur-comment/includes/class-sg-autorepondeur-comment-deactivator.php
    • > /wp-content/plugins/sg-autorepondeur-comment/models/Sgarc_CommentHandler.php
    • > /wp-content/plugins/sg-autorepondeur-comment/public/sgarc_comment_display.php
    • > /wp-content/plugins/sg-autorepondeur-comment/admin/sgarc_settings.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/sg-autorepondeur-comment/admin/partials/settings_page.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sg-autorepondeur-comment/public/partials/joining_list_agreement_box.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: sg autorepondeur, comment opt-in, sg-autorepondeur, autoresponder

sg-autorepondeur-comment/sg-autorepondeur-comment.php Passed 13 tests

The entry point to "SG Autorepondeur Comment" version 1.0.0 is a PHP file that has certain tags in its header comment area
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected499 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP19206567441
PO File19026
Markdown116017
JavaScript25549
CSS2086

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.58
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods4688.46%
▷ Protected methods11.92%
▷ Private methods59.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.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