88% advanced-plugin-search

Code Review | Advanced Plugin Search

WordPress plugin Advanced Plugin Search scored 88% from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 598 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Advanced Plugin Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2463.95 ▲13.03
Dashboard /wp-admin3.61 ▲0.2033.41 ▲0.54
Posts /wp-admin/edit.php3.83 ▲0.1942.90 ▲7.77
Add New Post /wp-admin/post-new.php7.14 ▲0.17108.63 ▼1,160.62
Media Library /wp-admin/upload.php3.53 ▲0.2326.35 ▼3.99

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 2 new options
New WordPress options
klick-aps-advanced-search-toggle
klick-aps-logging

Browser metrics Passed 4 tests

Advanced Plugin Search: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,941 ▲19716.46 ▲0.398.82 ▲2.392.82 ▲0.51
Dashboard /wp-admin2,917 ▲636.12 ▼0.06118.80 ▼13.38171.22 ▲12.00
Posts /wp-admin/edit.php2,721 ▲303.13 ▼0.1165.97 ▼0.42141.06 ▼1.08
Add New Post /wp-admin/post-new.php1,654 ▼5721.48 ▲0.77385.56 ▼66.22175.22 ▲18.47
Media Library /wp-admin/upload.php1,721 ▲235.63 ▲0.11132.26 ▼19.76214.47 ▲22.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 15× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-logger.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-email-logger.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-notifier.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-dashboard.php
    • > /wp-content/plugins/advanced-plugin-search/templates/klick-aps-tabs-header.php
    • > /wp-content/plugins/advanced-plugin-search/templates/notices-templates/main-dashboard-notices.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-php-logger.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-abstract-notice.php
    • > /wp-content/plugins/advanced-plugin-search/templates/klick-aps-tab-change-log.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-abstract-logger.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant KLICK_APS_PLUGIN_URL - assumed 'KLICK_APS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-plugin-search/templates/klick-aps-tab-our-other-plugins.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-plugin-search/templates/klick-aps-tab-our-other-plugins.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-plugin-search/templates/klick-aps-tab-aps-manage.php:13

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Advanced Plugin Search enable/disable Tab), #2 (Download plugin data to local DB), #3 (Do Advance search by selecting various parameters)
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "Advanced Plugin Search" version 0.0.2
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,642 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP204206261,426
SVG10010475
CSS62216468
JavaScript345118218
Markdown135055

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.54
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods92
▷ Static methods66.52%
▷ Public methods9198.91%
▷ Protected methods00.00%
▷ Private methods11.09%
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.15MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notices/cs_sample_notice_icon3.png30.17KB6.04KB▼ 79.98%
images/notices/cs_sample_notice_icon.png20.74KB1.79KB▼ 91.39%
images/klick-on-it.png6.51KB4.02KB▼ 38.23%
images/aps-banner.png65.02KB22.82KB▼ 64.91%
images/small_icon.png18.12KB0.45KB▼ 97.52%