68% api-car-trawler

Code Review | API FOR CAR TRAWLER

WordPress plugin API FOR CAR TRAWLER scored68%from 54 tests.

About plugin

  • Plugin page: api-car-trawler
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Aug 20, 2020
  • Latest release: Aug 25, 2020
  • Number of updates: 9
  • Update frequency: every 2.4 days
  • Top authors: thakurrahul317 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.88MB] [CPU: ▼64.22ms] Passed 4 tests

Analyzing server-side resources used by API FOR CAR TRAWLER
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.345.07 ▼39.92
Dashboard /wp-admin2.14 ▼1.216.01 ▼64.30
Posts /wp-admin/edit.php2.14 ▼1.227.75 ▼47.39
Add New Post /wp-admin/post-new.php2.14 ▼3.757.79 ▼105.27
Media Library /wp-admin/upload.php2.14 ▼1.096.04 ▼33.62
Cartrawler Settings /wp-admin/options-general.php?page=cartrawler-settings2.147.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by API FOR CAR TRAWLER
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.93 ▼0.377.98 ▲6.1747.02 ▲3.43
Dashboard /wp-admin2,222 ▲485.79 ▲0.2893.22 ▲5.3443.06 ▲0.10
Posts /wp-admin/edit.php2,132 ▲292.29 ▲0.2139.84 ▼3.0335.06 ▼5.37
Add New Post /wp-admin/post-new.php1,547 ▲2123.38 ▼0.37646.11 ▼58.6632.06 ▼22.69
Media Library /wp-admin/upload.php1,430 ▲334.43 ▲0.3499.33 ▼5.7043.61 ▲1.26
Cartrawler Settings /wp-admin/options-general.php?page=cartrawler-settings1,3942.8159.8026.83

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=cartrawler-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/api-car-trawler/public/partials/api-for-car-trawler-public-display.php
    • > /wp-content/plugins/api-car-trawler/admin/partials/api-for-car-trawler-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5, #6 in api-car-trawler/assets to your readme.txt
Please take inspiration from this readme.txt

api-car-trawler/api-for-car-trawler.php 85% from 13 tests

"API FOR CAR TRAWLER" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("api-car-trawler.php" instead of "api-for-car-trawler.php")

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
Success! There were no dangerous files found in this plugin446 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12181540435
JavaScript365511
CSS2080

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.05
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected