84% wp-theme-test

Code Review | WP Theme Test

WordPress plugin WP Theme Test scored84%from 54 tests.

About plugin

  • Plugin page: wp-theme-test
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.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 /74,251 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼4.84ms] 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 /3.53 ▲0.0742.21 ▲5.13
Dashboard /wp-admin3.37 ▲0.0242.96 ▼15.88
Posts /wp-admin/edit.php3.48 ▲0.1348.66 ▲1.45
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.98 ▼3.33
Media Library /wp-admin/upload.php3.29 ▲0.0634.38 ▼1.60
WP Theme Test /wp-admin/themes.php?page=wp-theme-test3.2831.33

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, 7 new options
New WordPress options
db_upgraded
wp-theme-test
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Theme Test
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.19 ▼0.161.68 ▼0.0143.61 ▲0.19
Dashboard /wp-admin2,202 ▲225.62 ▲0.0195.80 ▲10.8542.77 ▲2.21
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0640.07 ▲2.8236.54 ▼0.98
Add New Post /wp-admin/post-new.php1,532 ▲423.41 ▲0.41599.55 ▼47.7953.33 ▼9.07
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.04100.48 ▲6.1340.55 ▼1.76
WP Theme Test /wp-admin/themes.php?page=wp-theme-test1,1823.3774.9939.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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

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:
  • 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
PHP373100359
PO File227094
CSS14026

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
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ 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