94% wp-theme-test

Code Review | WP Theme Test

WordPress plugin WP Theme Test scored 94% from 54 tests.

About plugin

  • Plugin page: wp-theme-test
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Oct 14, 2015
  • Latest release: Feb 24, 2022
  • Number of updates: 86
  • Update frequency: every 27.1 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

9,000+ active / 60,445 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼202.07ms] Passed 4 tests

Analyzing server-side resources used by WP Theme Test
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0629.27 ▲5.34
Dashboard /wp-admin3.13 ▲0.0637.07 ▼3.84
Posts /wp-admin/edit.php3.21 ▲0.1033.39 ▼2.76
Add New Post /wp-admin/post-new.php5.49 ▲0.0574.71 ▼803.52
Media Library /wp-admin/upload.php3.07 ▲0.0627.93 ▲1.83
WP Theme Test /wp-admin/themes.php?page=wp-theme-test3.0625.22

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for WP Theme Test
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲7915.91 ▼0.047.43 ▲1.9776.19 ▼0.16
Dashboard /wp-admin2,935 ▲436.08 ▼0.06114.93 ▼15.61169.50 ▼0.94
Posts /wp-admin/edit.php2,745 ▲83.24 ▲0.0069.06 ▲3.51138.01 ▼1.71
Add New Post /wp-admin/post-new.php3,757 ▲2215.63 ▼2.48420.64 ▼33.08161.30 ▼11.53
Media Library /wp-admin/upload.php1,754 ▲25.54 ▲0.01146.99 ▲8.36183.50 ▼2.39
WP Theme Test /wp-admin/themes.php?page=wp-theme-test1,4823.70102.02145.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-theme-test/wp-theme-test.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPTT_Core' not found in wp-content/plugins/wp-theme-test/classes/class.admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


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:
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

wp-theme-test/wp-theme-test.php 92% from 13 tests

"WP Theme Test" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin479 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File227094

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.67
▷ Minimum class complexity13.00
▷ Maximum class complexity27.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants6100.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
PNG images were not found in this plugin