74% annonces-automobile

Code Review | Annonces Automobile

WordPress plugin Annonces Automobile scored74%from 54 tests.

About plugin

  • Plugin page: annonces-automobile
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2018
  • Latest release: Nov 6, 2018
  • Number of updates: 11
  • Update frequency: every 4.8 days
  • Top authors: motorsgate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,251 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.22MB] [CPU: ▼49.28ms] Passed 4 tests

Server-side resources used by Annonces Automobile
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.697.18 ▼36.64
Dashboard /wp-admin2.79 ▼0.527.70 ▼43.95
Posts /wp-admin/edit.php2.79 ▼0.579.50 ▼37.56
Add New Post /wp-admin/post-new.php2.79 ▼3.109.08 ▼78.95
Media Library /wp-admin/upload.php2.79 ▼0.449.14 ▼23.84

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Annonces Automobile
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.34 ▼1.249.11 ▲6.9542.64 ▼1.38
Dashboard /wp-admin2,228 ▲524.92 ▼0.1496.53 ▼22.9635.60 ▼10.34
Posts /wp-admin/edit.php2,111 ▲222.22 ▲0.1939.93 ▲2.8734.92 ▼1.50
Add New Post /wp-admin/post-new.php1,530 ▼323.24 ▲0.14669.46 ▼0.8457.35 ▼0.65
Media Library /wp-admin/upload.php1,410 ▲224.31 ▲0.1595.43 ▼0.6941.55 ▼1.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the annoncesautomobile_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_annoncesautomobile_recherche_widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_style() in wp-content/plugins/annonces-automobile/annonces-automobile.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Stable tag: Empty value
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

annonces-automobile/annonces-automobile.php Passed 13 tests

"Annonces Automobile" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
87 characters long description:
Affichez les annonces de voiture en provenance de la plateforme Annonces-Automobile.com

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,452 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity29.50
▷ Minimum class complexity7.00
▷ Maximum class complexity52.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions17100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/overlay.png0.95KB0.09KB▼ 90.11%