73% robcore-netatmo

Code Review | Robcore Netatmo

WordPress plugin Robcore Netatmo scored 73% from 54 tests.

About plugin

  • Plugin page: robcore-netatmo
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 5.8.1
  • First release: Jun 27, 2015
  • Latest release: Sep 27, 2015
  • Number of updates: 23
  • Update frequency: every 4.1 days
  • Top authors: robcore89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,177 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼173.04ms] Passed 4 tests

Analyzing server-side resources used by Robcore Netatmo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1728.09 ▲9.20
Dashboard /wp-admin3.12 ▲0.0644.93 ▲3.63
Posts /wp-admin/edit.php3.17 ▲0.0644.80 ▼3.01
Add New Post /wp-admin/post-new.php5.48 ▲0.0594.79 ▼689.16
Media Library /wp-admin/upload.php3.06 ▲0.0534.92 ▼3.60
Robcore Netatmo Settings /wp-admin/options-general.php?page=robcore-netatmo3.2428.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: 1 new table, no new options
New tables
wp_robcore_netatmo_data

Browser metrics Passed 4 tests

An overview of browser requirements for Robcore Netatmo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.93 ▼0.0212.40 ▲3.0247.69 ▼3.46
Dashboard /wp-admin2,978 ▲446.01 ▲0.07132.87 ▼9.85120.35 ▲7.78
Posts /wp-admin/edit.php2,741 ▲22.70 ▼0.0163.07 ▼0.1988.03 ▼2.75
Add New Post /wp-admin/post-new.php1,675 ▼818.81 ▲0.04375.82 ▼10.87111.81 ▼0.00
Media Library /wp-admin/upload.php1,815 ▲85.04 ▲0.01145.08 ▼9.47115.50 ▼8.85
Robcore Netatmo Settings /wp-admin/options-general.php?page=robcore-netatmo1,1832.1157.6981.79

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
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_robcore_netatmo_data

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=robcore-netatmo
    • > Notice in wp-content/plugins/robcore-netatmo/view/settings.tmpl.php+13
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/robcore-netatmo/inc/netatmo_api/CLI_THERM_ClientCredential_Example.php
    • > /wp-content/plugins/robcore-netatmo/inc/netatmo_api/WEB_AuthorisationCode_Example.php
    • > /wp-content/plugins/robcore-netatmo/inc/netatmo_api/CLI_PARTNER_Example.php
    • > /wp-content/plugins/robcore-netatmo/inc/netatmo_api/CLI_ClientCredential_Example.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/robcore-netatmo/view/form_account_request.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/robcore-netatmo/robcore-netatmo.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/robcore-netatmo/view/settings.tmpl.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/robcore-netatmo/inc/ottengo_credenziali_user.php:5

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in robcore-netatmo/assets to your readme.txt
The official readme.txt is a good inspiration

robcore-netatmo/robcore-netatmo.php Passed 13 tests

The entry point to "Robcore Netatmo" version 1.7 is a PHP file that has certain tags in its header comment area
46 characters long description:
Display Netatmo weather data using shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,585 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP131753551,581
Markdown1204

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.60
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods3378.57%
▷ Protected methods49.52%
▷ Private methods511.90%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants89
▷ Global constants910.11%
▷ Class constants8089.89%
▷ Public constants80100.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
PNG images were not found in this plugin