88% covoituristes

Code Review | Covoituristes

WordPress plugin Covoituristes scored 88% from 54 tests.

About plugin

  • Plugin page: covoituristes
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-4.0.0
  • WordPress version: 5.8.1
  • First release: Nov 26, 2014
  • Latest release: May 7, 2016
  • Number of updates: 10
  • Update frequency: every 52.8 days
  • Top authors: ladauze (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,488 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼145.50ms] Passed 4 tests

An overview of server-side resources used by Covoituristes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0234.72 ▼4.61
Dashboard /wp-admin3.09 ▲0.0347.94 ▼5.29
Posts /wp-admin/edit.php3.14 ▲0.0344.57 ▼9.89
Add New Post /wp-admin/post-new.php5.45 ▲0.0188.48 ▼562.22
Media Library /wp-admin/upload.php3.03 ▲0.0333.20 ▲1.73
Covoituristes /wp-admin/options-general.php?page=wp_covoiturageclass2.9835.14

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Covoituristes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲11216.21 ▲0.568.68 ▼3.5048.73 ▼0.19
Dashboard /wp-admin2,969 ▲325.93 ▼0.01176.08 ▲10.23116.26 ▼2.38
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0172.50 ▼8.9293.35 ▼4.48
Add New Post /wp-admin/post-new.php1,686 ▲318.77 ▲0.03394.89 ▼13.77110.86 ▲1.42
Media Library /wp-admin/upload.php1,812 ▲55.05 ▲0.01164.67 ▼7.89125.21 ▲7.79
Covoituristes /wp-admin/options-general.php?page=wp_covoiturageclass1,0032.1235.8275.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp_covoiturageclass
    • > Error in wp-admin/includes/template.php+1720
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/covoituristes/covoituristes.php on line 170 and exactly 2 expected in wp-admin/includes/template.php:1720
    Stack trace:
    #0 wp-content/plugins/covoituristes/covoituristes.php(170): do_settings_fields()
    #1 wp-includes/class-wp-hook.php(303): WP_covoiturageclass->covoiturageplugin_settings_page()
    #2 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP 50% 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
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-http.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/covoituristes/covoituristes.php on line 272
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/covoituristes/covoituristes.php on line 272
    • > PHP Warning
      include_once(ABSPATHWPINC/class-http.php): failed to open stream: No such file or directory in wp-content/plugins/covoituristes/covoituristes.php on line 272
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/covoituristes/covoituristes.php:277
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/covoituristes/covoituristes.php on line 272

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in covoituristes/assets to your readme.txt
Please take inspiration from this readme.txt

covoituristes/covoituristes.php Passed 13 tests

"Covoituristes" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
43 characters long description:
Discontinued - see http://www.covoiturix.fr

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin207 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14654207

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
covoituristes_fr_95x50.png5.04KB2.98KB▼ 40.94%