78% trucker-to-trucker-listings

Code Review | Trucker to Trucker Listings

WordPress plugin Trucker to Trucker Listings scored78%from 54 tests.

About plugin

  • Plugin page: trucker-to-trucke...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Feb 21, 2014
  • Latest release: Feb 22, 2014
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: TruckerToTrucker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.29ms] Passed 4 tests

An overview of server-side resources used by Trucker to Trucker Listings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.92 ▼7.73
Dashboard /wp-admin3.32 ▲0.0249.84 ▼9.83
Posts /wp-admin/edit.php3.37 ▲0.0251.03 ▲0.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.34 ▼12.06
Media Library /wp-admin/upload.php3.25 ▲0.0239.70 ▲0.46
TruckerToTrucker Listings /wp-admin/options-general.php?page=TruckerToTrucker_Listings3.1932.43

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_TruckerToTrucker_Listings
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trucker to Trucker Listings
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.44 ▼0.9110.98 ▲9.4639.32 ▼1.48
Dashboard /wp-admin2,199 ▲195.57 ▼0.0985.23 ▼7.9339.05 ▼3.78
Posts /wp-admin/edit.php2,101 ▲41.97 ▼0.0636.27 ▲0.3633.82 ▼4.07
Add New Post /wp-admin/post-new.php1,531 ▲523.01 ▼0.66669.12 ▼10.1353.72 ▼8.15
Media Library /wp-admin/upload.php1,401 ▼24.23 ▲0.0093.00 ▼6.8844.76 ▼0.58
TruckerToTrucker Listings /wp-admin/options-general.php?page=TruckerToTrucker_Listings8182.0222.4831.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=TruckerToTrucker_Listings
    • > Notice in wp-content/plugins/trucker-to-trucker-listings/TruckerToTrucker_Listings.php+149
    Undefined index: api
    • > GET request to /wp-admin/options-general.php?page=TruckerToTrucker_Listings
    • > Notice in wp-content/plugins/trucker-to-trucker-listings/TruckerToTrucker_Listings.php+120
    Undefined variable: api_result1

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/trucker-to-trucker-listings/TruckerToTrucker_Listings.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: truckertotruckercom, trucker to trucker

trucker-to-trucker-listings/TruckerToTrucker_Listings.php 92% from 13 tests

The main PHP file in "Trucker to Trucker Listings" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("trucker-to-trucker-listings.php" instead of "TruckerToTrucker_Listings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected401 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1352211
PHP17043130
JavaScript25460

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
TruckerToTrucker_Listings.png42.14KB15.62KB▼ 62.93%
lightbox/images/fancybox_overlay.png0.98KB0.09KB▼ 90.43%
lightbox/images/fancybox_sprite.png1.33KB1.42KB0.00%