78% advanced-plugin-search

Code Review | Advanced Plugin Search

WordPress plugin Advanced Plugin Search scored78%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: 6.3.1
  • 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 /796 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.84ms] Passed 4 tests

A check of server-side resources used by Advanced Plugin Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.69 ▼1.35
Dashboard /wp-admin3.33 ▲0.0348.57 ▲1.74
Posts /wp-admin/edit.php3.45 ▲0.0949.18 ▲2.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.73 ▲0.26
Media Library /wp-admin/upload.php3.26 ▲0.0336.86 ▲3.85

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
klick-aps-advanced-search-toggle
klick-aps-logging
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Plugin Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17814.02 ▼0.235.27 ▲3.2238.22 ▼14.63
Dashboard /wp-admin2,227 ▲395.87 ▼0.03103.74 ▲3.0184.26 ▲43.11
Posts /wp-admin/edit.php2,116 ▲272.04 ▲0.0437.19 ▼0.4832.74 ▼2.95
Add New Post /wp-admin/post-new.php1,545 ▲1218.25 ▼4.86683.33 ▲19.0855.52 ▼1.53
Media Library /wp-admin/upload.php1,409 ▲184.23 ▲0.06114.74 ▲20.2442.97 ▼3.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 15× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-options.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-logger.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-abstract-logger.php
    • > /wp-content/plugins/advanced-plugin-search/templates/notices-templates/main-dashboard-notices.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-abstract-notice.php
    • > /wp-content/plugins/advanced-plugin-search/templates/klick-aps-tabs-header.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/templates/klick-aps-tab-change-log.php
    • > /wp-content/plugins/advanced-plugin-search/includes/class-klick-aps-db-operations.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > 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 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-aps-manage.php:13

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Advanced Plugin Search enable/disable Tab), #2 (Download plugin data to local DB), #3 (Do Advance search by selecting various parameters)
You can look at the official readme.txt

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

"Advanced Plugin Search" version 0.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 185 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,642 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP204206261,426
SVG10010475
CSS62216468
JavaScript345118218
Markdown135055

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/aps-banner.png65.02KB22.82KB▼ 64.91%
images/notices/cs_sample_notice_icon2.png9.63KB4.69KB▼ 51.23%
images/small_icon.png18.12KB0.45KB▼ 97.52%
images/notices/cs_sample_notice_icon.png20.74KB1.79KB▼ 91.39%
images/klick-on-it.png6.51KB4.02KB▼ 38.23%