78% scout-for-wp

Code Review | Scout for WordPress

WordPress plugin Scout for WordPress scored 78% from 54 tests.

About plugin

  • Plugin page: scout-for-wp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.8.0
  • WordPress version: 6.3.1
  • First release: Jun 11, 2017
  • Latest release: Jun 11, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: scoutforpets (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 698 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.20ms] Passed 4 tests

A check of server-side resources used by Scout for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.68 ▼3.38
Dashboard /wp-admin3.33 ▲0.0347.53 ▼2.99
Posts /wp-admin/edit.php3.44 ▲0.0948.70 ▲5.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.70 ▼9.62
Media Library /wp-admin/upload.php3.25 ▲0.0233.58 ▼0.80
Scout for WP /wp-admin/options-general.php?page=scout-for-wp3.2934.99

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scout for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.451.64 ▲0.0939.31 ▼2.71
Dashboard /wp-admin2,210 ▲254.82 ▼1.07107.41 ▲4.6839.83 ▲1.34
Posts /wp-admin/edit.php2,090 ▲11.97 ▼0.0240.42 ▲4.9534.35 ▲0.19
Add New Post /wp-admin/post-new.php1,517 ▼517.67 ▼5.81672.67 ▲2.0848.93 ▼5.66
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0794.51 ▲1.5742.19 ▼4.42
Scout for WP /wp-admin/options-general.php?page=scout-for-wp8092.0325.1729.64

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/scout-for-wp/loader.php
    • > /wp-content/plugins/scout-for-wp/scout-for-wp.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Controllers\\Display' not found in wp-content/plugins/scout-for-wp/includes/controllers/settings/class-display.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Utils\\Options' not found in wp-content/plugins/scout-for-wp/libraries/wprx/core/models/class-model-options.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Utils\\Options' not found in wp-content/plugins/scout-for-wp/libraries/wprx/core/forms/class-form-options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Models\\Model' not found in wp-content/plugins/scout-for-wp/includes/models/class-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Utils\\Options' not found in wp-content/plugins/scout-for-wp/libraries/wprx/core/controllers/class-controller-options.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Utils\\Options' not found in wp-content/plugins/scout-for-wp/libraries/wprx/core/views/class-view-options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/scout-for-wp/includes/views/settings/tmpl/default.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Wordpress\\Settings_Generic' not found in wp-content/plugins/scout-for-wp/libraries/wprx/core/wordpress/class-settings.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/scout-for-wp/includes/views/settings/tmpl/default.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Wprx\\Controllers\\Controller_Options' not found in wp-content/plugins/scout-for-wp/libraries/wprx/core/controllers/class-display-options.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === scout-for-wp === )
You can take inspiration from this readme.txt

scout-for-wp/scout-for-wp.php Passed 13 tests

"Scout for WordPress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
39 characters long description:
Embed Scout Lead form into your website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,428 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP40466111,428

PHP code Passed 2 tests

An overview 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.38
Average class complexity6.91
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes34
▷ Abstract classes12.94%
▷ Concrete classes3397.06%
▷ Final classes13.03%
Methods114
▷ Static methods2723.68%
▷ Public methods9583.33%
▷ Protected methods1815.79%
▷ Private methods10.88%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin