84% watsonfinds

Code Review | Watsonfinds

WordPress plugin Watsonfinds scored 84% from 54 tests.

About plugin

  • Plugin page: watsonfinds
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: May 8, 2019
  • Number of updates: 14
  • Update frequency: every 57.9 days
  • Top authors: watsonfinds (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 4,574 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.09MB] [CPU: ▼3.93ms] Passed 4 tests

This is a short check of server-side resources used by Watsonfinds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.96 ▼4.17
Dashboard /wp-admin3.33 ▲0.0248.24 ▼2.62
Posts /wp-admin/edit.php3.38 ▲0.0247.78 ▼2.03
Add New Post /wp-admin/post-new.php5.47 ▼0.4281.41 ▼6.88
Media Library /wp-admin/upload.php3.25 ▲0.0234.10 ▲0.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Watsonfinds
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.36 ▼1.433.86 ▲1.6140.90 ▼1.29
Dashboard /wp-admin2,231 ▲254.87 ▲0.01108.67 ▼2.4941.94 ▼2.42
Posts /wp-admin/edit.php2,117 ▲282.04 ▼0.1241.89 ▲5.4836.79 ▲4.97
Add New Post /wp-admin/post-new.php6,474 ▲4,94120.56 ▼2.661,025.38 ▲344.4364.24 ▲8.80
Media Library /wp-admin/upload.php1,416 ▲314.30 ▲0.0698.66 ▼16.5144.48 ▼3.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/watsonfinds/watsonfinds.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/watsonfinds/admin/index.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
Please take inspiration from this readme.txt

watsonfinds/watsonfinds.php 92% from 13 tests

The main PHP file in "Watsonfinds" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,589 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS316645884
JavaScript34828459
PHP37413246

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/includes/assets/images/toolbar.png1.38KB0.62KB▼ 55.57%