62% advanced-theme-search

Code Review | Advanced Theme Search

WordPress plugin Advanced Theme Search scored62%from 54 tests.

About plugin

  • Plugin page: advanced-theme-se...
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Nov 22, 2017
  • Latest release: Dec 5, 2017
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: klickonit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /813 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.79MB] [CPU: ▼34.07ms] Passed 4 tests

Server-side resources used by Advanced Theme Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.84 ▲1.28
Dashboard /wp-admin3.15 ▼0.1527.31 ▼21.64
Posts /wp-admin/edit.php3.15 ▼0.2024.11 ▼27.31
Add New Post /wp-admin/post-new.php3.15 ▼2.7326.59 ▼73.01
Media Library /wp-admin/upload.php3.15 ▼0.0824.84 ▼14.33
Advanced Theme Search /wp-admin/options-general.php?page=klick_ats3.1527.15

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
klick-ats-logging
can_compress_scripts
widget_recent-comments
klick-ats-advanced-search-toggle
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Theme Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15313.61 ▼0.987.65 ▲5.8338.90 ▼5.07
Dashboard /wp-admin2,216 ▲255.82 ▲0.76106.20 ▲0.1839.17 ▼1.45
Posts /wp-admin/edit.php2,102 ▲132.03 ▲0.0439.64 ▲4.2735.96 ▲2.64
Add New Post /wp-admin/post-new.php1,526 ▲723.20 ▲0.05606.34 ▼65.5353.60 ▼10.14
Media Library /wp-admin/upload.php1,401 ▲104.31 ▲0.07100.39 ▼2.6844.05 ▼2.14
Advanced Theme Search /wp-admin/options-general.php?page=klick_ats1,5662.1026.1334.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=klick_ats
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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 take a closer look at the following
  • 15× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/advanced-theme-search/includes/class-klick-ats-abstract-logger.php
    • > /wp-content/plugins/advanced-theme-search/templates/klick-ats-tabs-header.php
    • > /wp-content/plugins/advanced-theme-search/includes/class-klick-ats-logger.php
    • > /wp-content/plugins/advanced-theme-search/includes/class-klick-ats-options.php
    • > /wp-content/plugins/advanced-theme-search/includes/class-klick-ats-email-logger.php
    • > /wp-content/plugins/advanced-theme-search/includes/class-klick-ats-php-logger.php
    • > /wp-content/plugins/advanced-theme-search/templates/notices-templates/main-dashboard-notices.php
    • > /wp-content/plugins/advanced-theme-search/advanced-theme-search.php
    • > /wp-content/plugins/advanced-theme-search/includes/class-klick-ats-dashboard.php
    • > /wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-change-log.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-themes-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-ats-manage.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-our-other-plugins.php:3
    • > PHP Warning
      Use of undefined constant KLICK_ATS_PLUGIN_URL - assumed 'KLICK_ATS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-our-other-plugins.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-ats-manage-settings.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-ats-manage.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-themes-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-theme-search/templates/klick-ats-tab-ats-manage.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Advanced Theme Search enable/disable Tab), #2 (Download theme data to local DB), #3 (Do Advance search by selecting various parameters)
Please take inspiration from this readme.txt

advanced-theme-search/advanced-theme-search.php 85% from 13 tests

The main PHP script in "Advanced Theme Search" version 0.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 183 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin2,768 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP214236231,395
CSS63316615
SVG10010475
JavaScript349119228
Markdown135055

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.37
Average class complexity11.08
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods91
▷ Static methods66.59%
▷ Public methods9098.90%
▷ Protected methods00.00%
▷ Private methods11.10%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notices/cs_sample_notice_icon2.png9.63KB4.69KB▼ 51.23%
images/ats-banner.png62.17KB21.45KB▼ 65.50%
images/notices/cs_sample_notice_icon3.png30.17KB6.04KB▼ 79.98%
images/small_icon.png18.12KB0.45KB▼ 97.52%
images/notices/cs_sample_notice_icon.png20.74KB1.79KB▼ 91.39%