74% theme-development-preview

Code Review | Theme Development Preview

WordPress plugin Theme Development Preview scored74%from 54 tests.

About plugin

  • Plugin page: theme-development...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.5.2
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: May 19, 2016
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: xnau (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,636 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.83MB] [CPU: ▼54.73ms] Passed 4 tests

An overview of server-side resources used by Theme Development Preview
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.307.06 ▼37.92
Dashboard /wp-admin2.18 ▼1.128.49 ▼42.32
Posts /wp-admin/edit.php2.18 ▼1.188.67 ▼45.76
Add New Post /wp-admin/post-new.php2.18 ▼3.719.56 ▼92.93
Media Library /wp-admin/upload.php2.18 ▼1.058.00 ▼33.72
Theme Development Preview /wp-admin/options-general.php?page=theme_dev_preview2.195.99

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Theme Development Preview
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.51 ▲0.291.78 ▼0.3341.77 ▼6.85
Dashboard /wp-admin2,210 ▲244.80 ▼1.26104.47 ▼9.1341.08 ▼1.72
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0137.07 ▼1.2032.71 ▼1.92
Add New Post /wp-admin/post-new.php1,522 ▼1122.89 ▼0.19622.53 ▼45.3066.60 ▼14.58
Media Library /wp-admin/upload.php1,383 ▼54.22 ▲0.01105.00 ▼7.0643.07 ▼1.94
Theme Development Preview /wp-admin/options-general.php?page=theme_dev_preview9032.0229.7131.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/theme-development-preview/theme-dev-preview.php+76
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=theme_dev_preview
    • > Notice in wp-content/plugins/theme-development-preview/theme-dev-preview.php+359
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=theme_dev_preview
    • > Warning in wp-content/plugins/theme-development-preview/theme-dev-preview.php+359
    in_array() expects parameter 2 to be array, null given
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=theme_dev_preview
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=theme_dev_preview
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=theme_dev_preview
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+207
    Trying to get property 'ID' of non-object
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=theme_dev_preview
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: development, theme, preview, switcher

theme-development-preview/theme-dev-preview.php 92% from 13 tests

The entry point to "Theme Development Preview" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("theme-development-preview.php" instead of "theme-dev-preview.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin197 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP146157197

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin