83% theme-helper

Code Review | Theme Helper

WordPress plugin Theme Helper scored83%from 54 tests.

About plugin

  • Plugin page: theme-helper
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jun 28, 2015
  • Latest release: Feb 21, 2017
  • Number of updates: 28
  • Update frequency: every 21.7 days
  • Top authors: buboiasinine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼10.72ms] Passed 4 tests

This is a short check of server-side resources used by Theme Helper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1025.87 ▼14.09
Dashboard /wp-admin3.52 ▲0.2147.31 ▼9.07
Posts /wp-admin/edit.php3.63 ▲0.2749.02 ▼8.34
Add New Post /wp-admin/post-new.php6.12 ▲0.2385.52 ▼11.37
Media Library /wp-admin/upload.php3.44 ▲0.2138.32 ▲1.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Theme Helper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.45 ▼1.021.60 ▼0.2939.83 ▲1.35
Dashboard /wp-admin2,221 ▲365.14 ▼0.7298.35 ▼0.9978.17 ▲34.53
Posts /wp-admin/edit.php2,107 ▲152.18 ▲0.1937.43 ▼2.9633.43 ▼3.70
Add New Post /wp-admin/post-new.php1,530 ▲217.45 ▼0.74760.94 ▲135.5567.08 ▲12.61
Media Library /wp-admin/upload.php1,397 ▲124.32 ▲0.09101.69 ▼4.0674.84 ▲29.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/theme-helper/function.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-helper/settings_page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-helper/settings_page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: A description for screenshot #1 is missing in theme-helper/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === theme-helper === )
  • License uri: Invalid url: "GPLv2 or later"
The official readme.txt might help

theme-helper/themehelper.php 92% from 13 tests

The primary PHP file in "Theme Helper" version 1.11 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("theme-helper.php" instead of "themehelper.php")

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 detected1,384 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP330039907
CSS28315342
JavaScript1045135

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.30MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/admin-themehelper-icon.png2.12KB1.38KB▼ 34.79%
images/screenshot-1.png292.67KB85.78KB▼ 70.69%
images/themehelper-sprite.png10.80KB6.06KB▼ 43.91%
images/themehelper-icon.png1.01KB0.18KB▼ 82.06%