84% theme-test-drive

Code Review | Theme Test Drive

WordPress plugin Theme Test Drive scored84%from 54 tests.

About plugin

  • Plugin page: theme-test-drive
  • Plugin version: 2.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.3.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2008
  • Latest release: Nov 23, 2015
  • Number of updates: 42
  • Update frequency: every 69.0 days
  • Top authors: freediver (100%)

Code review

54 tests

User reviews

50 reviews

Install metrics

10,000+ active /512,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.77ms] Passed 4 tests

An overview of server-side resources used by Theme Test Drive
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.72 ▲0.47
Dashboard /wp-admin3.35 ▲0.0551.40 ▼1.95
Posts /wp-admin/edit.php3.40 ▲0.0548.23 ▼6.91
Add New Post /wp-admin/post-new.php5.93 ▲0.0597.75 ▼14.68
Media Library /wp-admin/upload.php3.28 ▲0.0540.94 ▲5.78
Theme Test Drive /wp-admin/themes.php?page=themedrive_options_page3.2633.43

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Theme Test Drive
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.38 ▼0.142.05 ▲0.2244.73 ▲1.25
Dashboard /wp-admin2,202 ▲255.59 ▼0.0889.54 ▲1.6942.97 ▲0.87
Posts /wp-admin/edit.php2,104 ▲11.99 ▲0.0138.76 ▼6.3033.63 ▼0.91
Add New Post /wp-admin/post-new.php1,529 ▲323.03 ▼0.14681.77 ▲19.9153.78 ▼9.44
Media Library /wp-admin/upload.php1,404 ▲44.30 ▲0.15104.60 ▼3.3145.81 ▲3.74
Theme Test Drive /wp-admin/themes.php?page=themedrive_options_page9271.9924.0023.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/theme-test-drive/themedrive.php:20

User-side errors Passed 1 test

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

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 require attention:
  • Screenshots: Add an image for screenshot #1 (Admin panel for installing and previewing themes)
Please take inspiration from this readme.txt

theme-test-drive/themedrive.php 92% from 13 tests

The principal PHP file in "Theme Test Drive" v. 2.9.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("theme-test-drive.php" instead of "themedrive.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin434 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP112248312
JavaScript1510122

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions15
▷ Named functions15100.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
11 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
i/rate.png0.64KB0.61KB▼ 5.16%
bg.png8.02KB5.79KB▼ 27.86%
screenshot-1.png7.86KB4.23KB▼ 46.10%
i/p1.png13.17KB5.81KB▼ 55.89%
screenshot-2.png56.89KB20.38KB▼ 64.18%