72% alt-report

Code Review | AlT Report

WordPress plugin AlT Report scored72%from 54 tests.

About plugin

  • Plugin page: alt-report
  • Plugin version: 1.12.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 5, 2017
  • Latest release: Sep 3, 2019
  • Number of updates: 76
  • Update frequency: every 12.7 days
  • Top authors: AlTi5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.22MB] [CPU: ▼0.27ms] Passed 4 tests

An overview of server-side resources used by AlT Report
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2644.96 ▲5.85
Dashboard /wp-admin3.51 ▲0.2045.39 ▼4.48
Posts /wp-admin/edit.php3.62 ▲0.2751.08 ▲4.21
Add New Post /wp-admin/post-new.php6.09 ▲0.2185.68 ▼2.53
Media Library /wp-admin/upload.php3.43 ▲0.2035.15 ▲1.72
Add New /wp-admin/post-new.php?post_type=rapport3.5548.90
Report tickets /wp-admin/edit.php?post_type=rapport3.4836.31
Statistiques /wp-admin/edit.php?post_type=rapport&page=statistiques3.4031.64
Setting /wp-admin/edit.php?post_type=rapport&page=settings3.4733.07
Redmine setting /wp-admin/edit.php?post_type=rapport&page=settings-redmine3.4431.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for AlT Report
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲24113.59 ▼0.808.79 ▲7.0437.43 ▼8.43
Dashboard /wp-admin2,245 ▲545.86 ▲1.00103.37 ▼5.4540.07 ▼9.24
Posts /wp-admin/edit.php2,131 ▲422.05 ▲0.0839.73 ▲4.2834.44 ▲0.93
Add New Post /wp-admin/post-new.php1,565 ▲4823.08 ▲5.58651.59 ▼11.5049.80 ▼5.14
Media Library /wp-admin/upload.php1,427 ▲394.23 ▲0.0495.67 ▼1.5342.83 ▲1.04
Add New /wp-admin/post-new.php?post_type=rapport2,3447.62174.8065.20
Report tickets /wp-admin/edit.php?post_type=rapport1,1792.0035.9329.69
Statistiques /wp-admin/edit.php?post_type=rapport&page=statistiques8182.0626.1125.78
Setting /wp-admin/edit.php?post_type=rapport&page=settings2,0351.8525.9029.48
Redmine setting /wp-admin/edit.php?post_type=rapport&page=settings-redmine9742.0422.8846.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=rapport&page=statistiques
    • > Notice in wp-content/plugins/alt-report/template/statistiques.php+61
    Undefined variable: array_status
    • > GET request to /wp-admin/edit.php?post_type=rapport&page=statistiques
    • > Warning in wp-content/plugins/alt-report/template/statistiques.php+61
    Invalid argument supplied for foreach()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rapport&page=settings-redmine
    • > Notice in wp-content/plugins/alt-report/template/settings_redmine.php+105
    Undefined index: protocol
    • > GET request to /wp-admin/edit.php?post_type=rapport&page=settings-redmine
    • > Notice in wp-content/plugins/alt-report/template/settings_redmine.php+131
    Undefined index: adresse
    • > GET request to /wp-admin/edit.php?post_type=rapport&page=settings-redmine
    • > Notice in wp-content/plugins/alt-report/template/settings_redmine.php+139
    Undefined index: projet

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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/alt-report/assets/altreport.css.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/alt-report/includes/script.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alt-report/alt-report.php:21
    • > PHP Notice
      Undefined variable: altreport_infos in wp-content/plugins/alt-report/includes/modales.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/alt-report/includes/modales.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/alt-report/includes/parametrage.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/alt-report/includes/modales.php on line 8
    • > PHP Warning
      Use of undefined constant ALTREPORT_LOAD_ASSETS - assumed 'ALTREPORT_LOAD_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/alt-report/includes/script.php on line 10
    • > PHP Warning
      Use of undefined constant ALTREPORT_VERSION - assumed 'ALTREPORT_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/alt-report/includes/script.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "wordpress.lived.fr/wp-login.php"
Please take inspiration from this readme.txt

alt-report/alt-report.php 92% from 13 tests

"AlT Report" version 1.12.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
No dangerous file extensions were detected4,386 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34301122,510
PHP102011861,440
CSS26112256
PO File27272180

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods13100.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin