78% anysearch

Code Review | AnySearch

WordPress plugin AnySearch scored78%from 54 tests.

About plugin

  • Plugin page: anysearch
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Nov 11, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ukrosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /506 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
Installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼2.31ms] Passed 4 tests

This is a short check of server-side resources used by AnySearch
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.34137.62 ▲93.46
Dashboard /wp-admin3.68 ▲0.3754.83 ▲4.86
Posts /wp-admin/edit.php3.73 ▲0.3751.90 ▼1.65
Add New Post /wp-admin/post-new.php6.19 ▲0.3190.52 ▼12.05
Media Library /wp-admin/upload.php3.54 ▲0.3138.20 ▼0.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 9 new options
New WordPress options
anysearch_ssl_disabled
theysaidso_admin_options
anysearch_sync_status
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
anysearch_sync_settings

Browser metrics Passed 4 tests

Checking browser requirements for AnySearch
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1414.21 ▼0.141.87 ▼0.1042.89 ▼5.23
Dashboard /wp-admin2,214 ▲345.59 ▼0.0793.01 ▼1.4543.18 ▲0.08
Posts /wp-admin/edit.php2,119 ▲192.00 ▼0.0234.17 ▼4.1533.73 ▼6.56
Add New Post /wp-admin/post-new.php1,538 ▲1021.97 ▼1.20634.36 ▼32.2355.18 ▲3.84
Media Library /wp-admin/upload.php1,416 ▲164.20 ▲0.0696.55 ▼19.6542.66 ▼3.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/anysearch/anysearch.php
  • 46× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Bukashk0zzz\\YmlGenerator\\Model\\Offer\\AbstractOffer' not found in wp-content/plugins/anysearch/vendor/bukashk0zzz/yml-generator/src/Model/Offer/OfferEventTicket.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Anysearch' not found in wp-content/plugins/anysearch/views/config.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Bukashk0zzz\\YmlGenerator\\Tests\\AbstractGeneratorTest' not found in wp-content/plugins/anysearch/vendor/bukashk0zzz/yml-generator/tests/OfferTourGeneratorTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Bukashk0zzz\\YmlGenerator\\Tests\\AbstractGeneratorTest' not found in wp-content/plugins/anysearch/vendor/bukashk0zzz/yml-generator/tests/OfferEventTicketGeneratorTest.php:19
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/anysearch/views/notice.php on line 55
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/anysearch/vendor/bukashk0zzz/yml-generator/tests/AbstractGeneratorTest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Bukashk0zzz\\YmlGenerator\\Model\\Offer\\OfferInterface' not found in wp-content/plugins/anysearch/vendor/bukashk0zzz/yml-generator/src/Model/Offer/AbstractOffer.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Anysearch' not found in wp-content/plugins/anysearch/views/expired.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Bukashk0zzz\\YmlGenerator\\Tests\\AbstractGeneratorTest' not found in wp-content/plugins/anysearch/vendor/bukashk0zzz/yml-generator/tests/OfferBookGeneratorTest.php:19
    • > PHP Warning
      include_once(ANYSEARCH__PLUGIN_DIRclass.background-task-init.php): failed to open stream: No such file or directory in wp-content/plugins/anysearch/class.anysearch-yml.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: woocommerce, search

anysearch/anysearch.php 92% from 13 tests

The primary PHP file in "AnySearch" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 247 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
Success! There were no dangerous files found in this plugin6,602 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP601,1132,5174,092
DTD911301,514
CSS1613340
Markdown2740200
JSON400164
PO File14848150
JavaScript2141872
XML28041
YAML28029

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.24
Average class complexity7.43
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces2
Traits2
Classes40
▷ Abstract classes512.50%
▷ Concrete classes3587.50%
▷ Final classes00.00%
Methods413
▷ Static methods5613.56%
▷ Public methods33280.39%
▷ Protected methods5713.80%
▷ Private methods245.81%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants10
▷ Global constants550.00%
▷ Class constants550.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
_inc/img/logo-full-2x.png30.06KB8.50KB▼ 71.73%