84% wp-theme-scripts

Code Review | WP Theme Scripts

WordPress plugin WP Theme Scripts scored84%from 54 tests.

About plugin

  • Plugin page: wp-theme-scripts
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2019
  • Latest release: Aug 4, 2019
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: sindustries (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /542 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.99ms] Passed 4 tests

Analyzing server-side resources used by WP Theme Scripts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.72 ▼4.33
Dashboard /wp-admin3.31 ▲0.0149.14 ▼2.13
Posts /wp-admin/edit.php3.36 ▲0.0148.51 ▲0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.28 ▼17.89
Media Library /wp-admin/upload.php3.24 ▲0.0134.92 ▼3.60
Theme Scripts /wp-admin/options-general.php?page=wpts-theme-scripts3.2033.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Theme Scripts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.36 ▲0.092.81 ▲1.2541.07 ▼1.65
Dashboard /wp-admin2,193 ▲165.54 ▼0.0683.44 ▼10.0137.25 ▼0.05
Posts /wp-admin/edit.php2,104 ▲251.98 ▼0.0036.80 ▲1.3432.57 ▼3.32
Add New Post /wp-admin/post-new.php1,529 ▲122.87 ▲0.04593.35 ▼43.8167.77 ▼0.40
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.1199.66 ▼7.9843.55 ▲0.25
Theme Scripts /wp-admin/options-general.php?page=wpts-theme-scripts8381.9624.6826.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-theme-scripts/inc/register.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-theme-scripts/wp-theme-scripts.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-theme-scripts/inc/menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-theme-scripts/inc/errors.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-theme-scripts/inc/actions.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
3 plugin tags: css, javascript, theme scripts

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

The entry point to "WP Theme Scripts" version 0.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected100 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP76616100

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.64KB7.88KB▼ 52.66%