84% theme-detector

Code Review | wordpress theme detector

WordPress plugin wordpress theme detector scored84%from 54 tests.

About plugin

  • Plugin page: theme-detector
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 12, 2017
  • Latest release: Feb 12, 2018
  • Number of updates: 12
  • Update frequency: every 26.2 days
  • Top authors: wizardinfosys (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /1,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by wordpress theme detector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.80 ▼7.74
Dashboard /wp-admin3.33 ▼0.0248.40 ▼23.52
Posts /wp-admin/edit.php3.38 ▲0.0265.23 ▲13.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.16 ▼23.90
Media Library /wp-admin/upload.php3.25 ▲0.0235.83 ▲0.50

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

wordpress theme detector: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.97 ▼0.556.14 ▲4.4245.13 ▲1.61
Dashboard /wp-admin2,228 ▲405.77 ▲0.88101.03 ▼21.6639.87 ▼6.69
Posts /wp-admin/edit.php2,114 ▲222.01 ▼0.0343.46 ▲5.5735.60 ▲2.97
Add New Post /wp-admin/post-new.php1,533 ▲1423.06 ▼0.13675.53 ▲1.3056.62 ▲0.15
Media Library /wp-admin/upload.php1,413 ▲314.21 ▲0.0995.86 ▼6.3742.30 ▼3.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-detector/theme-detector.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/theme-detector/admin/dtctr_setting.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/theme-detector/core/_form.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/theme-detector/core/theme_layout.php:124

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #2 (Implementation of the tool on a page or post), #3 (Search results - theme), #4 (Search results - plugins)
You can look at the official readme.txt

theme-detector/theme-detector.php 92% from 13 tests

The main PHP script in "wordpress theme detector" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 193 characters long)

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 plugin622 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS31213353
PHP44684207
JavaScript14062

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin