10% chaletagent

Code Review | Chalet Agent

WordPress plugin Chalet Agent scored10%from 54 tests.

About plugin

  • Plugin page: chaletagent
  • Plugin version: 0.2.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0.3
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Oct 18, 2022
  • Number of updates: 43
  • Update frequency: every 61.7 days
  • Top authors: ChaletAgent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /987 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/chaletagent/class/main.php+32
    Undefined index: page

Server metrics [RAM: ▼1.90MB] [CPU: ▼48.75ms] Passed 4 tests

This is a short check of server-side resources used by Chalet Agent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.14 ▼33.71
Dashboard /wp-admin2.11 ▼1.195.98 ▼41.55
Posts /wp-admin/edit.php2.11 ▼1.245.72 ▼38.98
Add New Post /wp-admin/post-new.php2.11 ▼3.776.11 ▼80.74
Media Library /wp-admin/upload.php2.11 ▼1.127.02 ▼25.22
ChaletAgent /wp-admin/options-general.php?page=chaletagent-options3.2529.67

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
chaletagent_saas_account
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chalet Agent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.35 ▲0.121.71 ▲0.1944.02 ▲8.02
Dashboard /wp-admin2,204 ▲235.56 ▼0.1582.16 ▼16.6538.44 ▼1.60
Posts /wp-admin/edit.php2,112 ▲152.02 ▲0.0632.97 ▼6.5632.21 ▼5.26
Add New Post /wp-admin/post-new.php1,548 ▲1918.09 ▼5.60614.36 ▼26.7272.30 ▲23.54
Media Library /wp-admin/upload.php1,412 ▲154.19 ▼0.00106.12 ▲9.4444.93 ▼0.14
ChaletAgent /wp-admin/options-general.php?page=chaletagent-options9901.9922.0833.42

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/chaletagent/class/main.php+32
    Undefined index: page
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • chaletagent_saas_account
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/chaletagent/chalet-agent.php
    • > /wp-content/plugins/chaletagent/inc/help-text.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/chaletagent/inc/error-log.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: chaletagent, chalet, chalet agent

chaletagent/chalet-agent.php 92% from 13 tests

The main PHP file in "Chalet Agent" ver. 0.2.17 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("chaletagent.php" instead of "chalet-agent.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin449 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7111208376
CSS119573

PHP code Passed 2 tests

Analyzing 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.19
Average class complexity9.00
▷ Minimum class complexity7.00
▷ Maximum class complexity11.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1986.36%
▷ Protected methods00.00%
▷ Private methods313.64%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin