68% testdrive

Code Review | TestDrive

WordPress plugin TestDrive scored 68% from 54 tests.

About plugin

  • Plugin page: testdrive
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-4.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: May 1, 2015
  • Number of updates: 7
  • Update frequency: every 7.3 days
  • Top authors: daleksandrov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 799 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: ▼0.95MB] [CPU: ▼33.29ms] Passed 4 tests

This is a short check of server-side resources used by TestDrive
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.98 ▼2.33
Dashboard /wp-admin2.99 ▼0.3122.68 ▼22.20
Posts /wp-admin/edit.php2.99 ▼0.3626.35 ▼23.14
Add New Post /wp-admin/post-new.php2.99 ▼2.8924.62 ▼73.07
Media Library /wp-admin/upload.php2.99 ▼0.2422.48 ▼14.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TestDrive
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.23 ▼1.142.09 ▲0.0842.32 ▼2.57
Dashboard /wp-admin2,225 ▲375.86 ▲0.97108.70 ▼3.1444.17 ▲3.66
Posts /wp-admin/edit.php2,108 ▲192.03 ▼0.0140.84 ▲1.6135.91 ▼1.27
Add New Post /wp-admin/post-new.php1,533 ▲1423.29 ▲0.19663.14 ▼6.2856.27 ▼3.02
Media Library /wp-admin/upload.php1,407 ▲224.23 ▼0.0397.66 ▼3.6245.61 ▼0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • This plugin did not uninstall successfully, 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 Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/testdrive/enroll.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/testdrive/testdrive.php:93

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === testdrive === )
The official readme.txt might help

testdrive/testdrive.php 92% from 13 tests

The primary PHP file in "TestDrive" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 154 characters long)

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 detected163 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3314292
JavaScript14438
XML10033

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
There were not PNG files found in your plugin