79% theme-support

Code Review | Theme Support

WordPress plugin Theme Support scored79%from 54 tests.

About plugin

  • Plugin page: theme-support
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Nov 21, 2018
  • Latest release: Nov 21, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: AjitBohra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,056 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: ▼1.80MB] [CPU: ▼52.87ms] Passed 4 tests

Analyzing server-side resources used by Theme Support
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.297.36 ▼38.08
Dashboard /wp-admin2.23 ▼1.129.76 ▼51.95
Posts /wp-admin/edit.php2.23 ▼1.138.33 ▼42.51
Add New Post /wp-admin/post-new.php2.23 ▼3.6610.41 ▼78.95
Media Library /wp-admin/upload.php2.23 ▼1.0011.03 ▼26.87

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Theme Support
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6013.27 ▼1.424.42 ▲2.6639.91 ▼3.67
Dashboard /wp-admin2,225 ▲195.80 ▲0.89102.49 ▼4.0938.10 ▼6.96
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0242.25 ▲3.0133.95 ▼4.48
Add New Post /wp-admin/post-new.php1,536 ▲324.13 ▲1.03701.73 ▲25.3736.90 ▼23.28
Media Library /wp-admin/upload.php1,401 ▼24.27 ▲0.05105.51 ▼4.6046.02 ▼2.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/theme-support/wp-theme-support.php+236
    Trying to get property 'colors' of non-object
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: gutenberg, editor, support, theme

theme-support/wp-theme-support.php 85% from 13 tests

"Theme Support" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("theme-support.php" instead of "wp-theme-support.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,540 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15794982,347
PHP245145191
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods975.00%
▷ Protected methods00.00%
▷ Private methods325.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 are no PNG files in this plugin