68% sherloq

Code Review | SherloQ API Form Feeds

WordPress plugin SherloQ API Form Feeds scored68%from 54 tests.

About plugin

  • Plugin page: sherloq
  • Plugin version: 1.8.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2019
  • Latest release: Jun 21, 2023
  • Number of updates: 17
  • Update frequency: every 75.7 days
  • Top authors: sherloq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,478 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.96ms] Passed 4 tests

An overview of server-side resources used by SherloQ API Form Feeds
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1037.73 ▼1.18
Dashboard /wp-admin3.42 ▲0.1147.09 ▼5.56
Posts /wp-admin/edit.php3.54 ▲0.1847.64 ▼0.05
Add New Post /wp-admin/post-new.php6.02 ▲0.1380.67 ▼9.05
Media Library /wp-admin/upload.php3.35 ▲0.1235.52 ▲3.20
SherloQ API Feeds /wp-admin/admin.php?page=cf7-sherloq3.3232.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: 1 new table, 9 new options
New tables
wp_sherloq_log
New WordPress options
theysaidso_admin_options
sherloq_db_version
sherloq_api
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
sherloq_api_version
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for SherloQ API Form Feeds
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲6613.37 ▼1.003.66 ▲1.6641.53 ▼5.24
Dashboard /wp-admin2,216 ▲255.83 ▲0.93105.57 ▼10.8138.31 ▼7.75
Posts /wp-admin/edit.php2,099 ▲72.04 ▲0.0433.99 ▼11.8134.61 ▼12.25
Add New Post /wp-admin/post-new.php1,524 ▲717.64 ▲0.01670.12 ▲4.2154.06 ▼1.35
Media Library /wp-admin/upload.php1,395 ▲104.27 ▲0.0898.80 ▼1.0441.00 ▼1.96
SherloQ API Feeds /wp-admin/admin.php?page=cf7-sherloq8372.1623.7225.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/sherloq/includes/class-sherloq-activation.php+183
    Undefined variable: db_version
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • sherloq_api_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sherloq/views/panel.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sherloq/sherloq-api-form-feeds.php:27
    • > PHP Notice
      Undefined variable: model in wp-content/plugins/sherloq/views/panel.php on line 15
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sherloq/views/panel.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: api, contact, form, mail

sherloq/sherloq-api-form-feeds.php 77% from 13 tests

"SherloQ API Form Feeds" version 1.8.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:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("sherloq.php" instead of "sherloq-api-form-feeds.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin829 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6179422622
JavaScript35283190
CSS13017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.50
▷ Minimum class complexity5.00
▷ Maximum class complexity25.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods3093.75%
▷ Public methods2784.38%
▷ Protected methods412.50%
▷ Private methods13.12%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin